Design of direct form IIR Filter

while designing IIR filters(dirtect form coeff) using advanced IIR filtering VIs, i hv found that for a given filter spec,the coeff generated by LV and matlab are different in some cases specially higher order filters. The direct coeff. of a 6th order butterworth bandstop filter, fL=65 Hz and fH= 222Hz, when used in matlab showed a considerably different respose than LV, and the step response when evaluated in matlab turned out to be unstable. can someone explain the discrepancy. Thanks.

It sounds like they are just using different algorithms. I would suggest e-mailing into the NI support, with the Matlab script and the LabVIEW VI you are using. They may be able to find out where or how the two algorithms differ.

Similar Messages

  • IIR Direct Form II Structure Implementation

    Hello all, I am trying to implement the IIR Direct Form II filter structure in Labview. I am doing this the "hard way" and I am not using the Labview built-in filter blocks.  I have coded this in Matlab and have attached a zip file that contains: 1) the Labview VI. 2) the input waveform file for testing the Labview VI. 3) a document showing the Matlab graphs. The Matlab graphs are correct. The problem is that the first 3 graphs from the Labview VI match the Matlab graphs but the last one (Block 3 6th Order LPF output voltage) does not. The 6th Order Cascade LPF should be filtering out any frequency above 42Hz. As you can see from the other 3 graphs, the dominant frequency is 120Hz. But this is not being filtered out in the LPF. I should note that I am a new Labview user and have very limited knowledge on how to use this program. So, I will need detailed instructions, or even better, I would like for someone to modify the attached VI so I can see exactly how this should be done. Thanks! By the way the sample freq is 10kHz. But this is defaulted in the front panel. And all the coefficients that appear in the front panel are for the 6th order LPF and they agree (within round off error) with Matlab and with my hand calculations. I think my problem has something to do with how I am presenting the data to the filters. I am feeding the filter train directly with the waveform file. Maybe this is not correct?
    Attachments:
    LabviewFlickermeter.zip ‏2246 KB

    I'm not very familiar with filter logic, but it appears there must just be an issue with the actual code. With all the data wires crossing each other, two of them may be connecting when you intended on to go over the other or vice versa.
    Is there a reason you do not want to use the built-in LabVIEW VIs? Furthermore, the LabVIEW Adaptive Filter Toolkit has several tools that make filtering much easier (sorry, I don't mean to sound like a salesman..). If you're concerned with performance, these functions are typically as efficient - and sometimes more efficient - than hard coding everything.
    Sorry I know this isn't terribly helpful, but I would recommend confirming that the logic is correct and/or trying to utilize some of LabVIEW's functions to make this a bit easier.
    -Chris G
    Applications Engineer
    National Instruments

  • IIR Filter without using a loopm t

    I'm trying to apply an IIR filter equation to a large array and for this reason I don't want to use a FOR loop - because it takes forever to get through the array. Is is possible to do this using array functions? I have done similar things for FIR filters but it's the use of previous output values that has me stumped.
    Can anybody help?
    Thanks,
    Ken

    Ken,
    There are two VIs that should be available to help with this.  Look for IIR Cascade Filter.vi and IIR Filter.vi.  Both implement the filter with the coefficients being inputs.  The difference is in the layout of the coefficients.  IIR Filter.vi uses direct form, IIR Cascade Filter.vi uses cascaded 2nd or 4th order stages.  The layout for both structures can be found in the online help.
    -Jim

  • Implementa​tion of iir filter

    i want to implement each second order stage using the direct form II filter equations
    s[i] = x[i]-a1s[i-1]-a2s[i-2]
    y[i] = b0s[i]+b1s[i-1]+b2s[i-2]
    can anybody please tell me how to implement this

    Do this in a for loop. (For each of your input points).
    For the delay elements, use the shift registers on the for loop. (Right click on for loop and add shift register.) If you click on the shift register element and drag it down (as if to resize it vertically) you will get another element underneath it. The top one is your first delay, the bottom one is your second delay, etc. You can do the same thing with your output also. Hope this helps.
    If you have more questions, e-mail me @
    [email protected]

  • O/p of butterworth filter and o/p of butterworthcoeff- cascade coeff- IIR filter is different?

    Hello All,
    I am designing a system wherein i need to make use of a IIR butterworth Low pass filter .
    I tried implementing the same in Labview using 2 methods:
    1st method:
    Selected Signal processing-->Filters-->ButterworthFilter.vi
    Got the o/p.... attached image 1--> Waveform
    2nd method:
    Selected Signal processing-->Filters--> Advanced IIR filter-->ButterworthCoefficients.vi-->CascadetoDirectCoefficients.vi -->IIRfilter.vi
    Got the o/p...attached image 1--> Waveform Cascade Coefii
    Both the o/ps differ from in each other if you apply for order 5, LPF, cut off: 35...samples : 250000....
    Could you please let me know what difference is there in selecting either of the filter designing way.....
    Please reply back asap as im stuck here and am confused....also im new to signal processing....so not sure abt the error im making...
    Thanks in advance...
    PSADSP
    Attachments:
    output difference.JPG ‏46 KB

    Afternoon PSADSP,
    I would dare to say it is possibly your implementation of these VI's that is giving you a difference in your results. The "Butterworth Filter.VI" uses the "Butterworth Coefficients.VI" and the "IIR Cascade Filter.VI" as sub vi's to do its thing.
    Have another look at there VI's and post back if you still having issues.
    regards
    Richard
    Richard S
    Applications Engineer
    Certified LabVIEW Associate Developer
    National Instruments UK&Ireland

  • Reset an IIR Filter with new data

    hello one and all,  i am creating waveforms and pumping them into an IIR filter.  at times the parameters of the experiment change and i want to reset the data that the IIR filter is drawing off of so that it is calculating from scratch.  i know about the reset input of the IIR filter, however, it is for redesigning the filter coefficients, etc., as stated in the labview help file.  so how do you tell the IIR filter that the waveforms coming in are now a new set of waveforms?
    thank you in advance.
    lucas

    Hi Lucas,
    I assume you are using the Digital IIR Filter.vi.  The logic is not immediately obvious on the diagram of the instances of this VI, but there are two sorts of reset that can happen, namely a coefficient redesign, and a filter state reset.  The coefficient redesign happens when either:
    1.  It is the first time the VI has been called
    2.  The reset control (on Digital IIR Filter.vi) is true
    3.  The dt value of the waveform changes from the previous iteration
    4.  The design specifications change from the previous iteration.
    The filter state reset (which is what you want I think) will happen:
    1.  If there has been a coefficient redesign
    2.  If the timestamp of the last point of the previous waveform does not match the timestamp of the first point of the current waveform + dt.  This is basically an assumption of continuity of the waveforms over consecutive calls to the VI.
    I think you have two choices to get the behavior you want.  First, you can use the continuity of the waveforms as a way of controlling the reset of the filter state.  When you want a reset, then make the current waveform discontinuous.  The second option would be to use the lower level VIs on the signal processing->filters->IIR palette.  This allows you to explicitly separate the design and implementation of the filter on your diagram, with explicit reset control on the filter states.

  • Is there a complex coefficient IIR filter VI?

    IIR filter VI will take a complex signal in, but it doesn't look (or act) like it takes complex coefficients.
    Is there an IIR filter VI that does use complex coefficients?
    --Mark

    The FIR and IIR filter VIs only accept real-valued inputs. When you wire an array of complex numbers into either of these VIs, or any other VI that accepts only double-precision numeric inputs for that matter, the complex values are simply coerced to doubles by taking the real component.
    LabVIEW doesn't have any FIR or IIR filters capable of handling complex values directly.
    Jarrod S.
    National Instruments

  • I am wanting to add picture and designs to my form how do I place it in a specific place on my form?

    I am wanting to add picture and designs to my form how do I place it in a specific place on my form?

    Currently we only support one field/item on a line. We are working on adding a feature that allows you to put multiple fields/items on a single line. We hope to have that out in a few months.
    Randy

  • Difference between Designer 6i and Forms 6i?

    difference between Designer 6i and Forms 6i?

    Designer 6i is more related to the development cycle of a database and the various tools that access the database(from creating the database entity relationship diagrams to creating the physical tables/ddl). Forms 6i is more geared towards data management of the database. Designer 6i has tools to help auto-generate 6i forms.

  • How do I change template designs once a form has been created using another template design?

    How do I change template designs once a form has been created using another template design?

    I talked to a service Representative and he told me there isn't a function to change a form using one template to a different template. For example, I used template for "Accommodation registration" and wanted to change it to "admissions application." I was hoping I could just select a "Change template" rather than having to copy/paste everything to the new template. But that's what i had to do. Maybe the next version of this software will make it easier to change design templates.

  • What is the best way to design a simple form that is captured in structured accessible database/file?

    Hi there,
    I need to design a simple form to capture some data from the users. This data shall be able to post into structured database where I can connect to the content to grab the data automatically every night.
    What is the simple recommended way to do this?
    Thank you

    I will agree with Margriet Bruggeman, But if you want to have a collaboration with these data with security, then "Business Connectivity Services (BCS) " could be another option. It need more config/development but it has own use too.
    Few detail links
    A
    step by step guide in designing BCS entities by using a SQL stored procedure (Jyoti Saikia)
    Business Connectivity Services (BCS) Overview
    If SharePoint list form will be only data entry interface then go with InfoPath, if not then BCS
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • How to design a Parameter Form

    Hi,
    How to design the parameter form with image which can be shown in the discoverer viewer.

    if i got your question right you need a image or logo in discoverer viewer right??
    Discoverer viewer dont support images or logos....Images are only supported in discoverer plus.
    anything more be clearer on the question.

  • Submit problem using Adobe Designer 7.0 form & GroupWise email

    We are designing an interactive form using Adobe Designer 7.0, and would like for other people in the organization to be able to fill in the form electronically then hit the "Submit by Email" to return the data.
    For email, we are using Novell GroupWise.
    Problems are occurring once the recipient of the form selects the "Send Data File" button. This action either causes Adobe to crash, or causes an error message, "Acrobat is unable to connect to your email program."
    Can anyone help? Is anyone successfully using this function with GroupWise email?

    I don't really have a solution for you - perhaps the following may be of use though:
    Try reinstalling Designer 7 and ensure that at the point where you are asked about your e-mail client that you tell it that you are using GroupWise.
    You may like to see if you can send an e-mail using the same method that we employ.
    This is the script we use on the 'click' event of a button that sends an e-mail with the form attached (via GroupWise) to the e-mail address as specified ("[email protected]" in the example below).
    var myDoc = event.target;
    myDoc.mailDoc(false,"[email protected]", "", "",
    "This is will appear in the subject line....",
    "Here is the message text............");

  • IIR filter, not contiguous, signal processing

    Hello!
    I am acquiring data countinuously from several voltage output sensors. I am sending the waveforms through an express vi filter (bandpass) and I am using the default setting for IIR filtering. The program is setup such that data acquisition is done with a while loop. The DAQ wile loop is inside of a bigger while loop which is related to program start and stop.
    Every time I am doing data acqusition through the filter I get a warning that tell me the waveforms are not contiguous. Again, this is not flagged as an error but rather as a warning. The attached example might clarification.
    The question is: is the IIR filter uses previous waveform information to judge the current waveform? If this is true, then I do not like the solution; if this is not true, the I should probably just ignore the warning...
    Does the express vi has some type of reset that would activate when the whole program stops because I do not see the warning message first time I start the vi?
    Thanks
    Attachments:
    FIlterCase.zip ‏58 KB

    Thank you for your answer.
    From your answer I deducted that whenever I restart the data acquisition while the main program is still running I'd better make sure I reset the filter such that it will now "know" that it is new data coming in. I did not have a chance to check inside the express vi yet but from what you are saying it must be some sort of reset button in there that I could 'pull out' in the connector block of the subvi..
    The band widths I am using are anywhere between 100 Hz to 40000 Hz so the transient duration will be short to very short and the system, the way it is setup now, will allow enough time to the IIR filter to handle correctly new data.
    Finally there is always the option to acquire just the raw data. later I could read it back and filter it if necessary. However, there are situations when I want to filter out noise and possible alising frequencies; moreover, I acquire vibrations and forces in the same time on the same board - if I need the 40kHz sampling rate for vibrations, automatically I will have it too for the "low end" signals as well (0 to 10V from power and force sensors). I believe doing some filtering and maybe some decimation after filtering will help me keep the amount of data low on the 'low end' signals side. Am I correct in my assumptions?
    Thanks again.

  • I want to design a login form on my website, can I do it without coding in Muse?

    I want to design a login form on my website, can I do it without coding in Muse? And if I want to set an Email function within my website, can I still use Muse?
    Thanks

    Hi Wenshu... I am sure someone will be along here shortly with a "right" answer, but here is my 2 cents.  On part 2 of your question, I just say something like "Click HERE to e-mail me" and on the HERE part, I type the link mailto:[email protected] (filling in your actual e-mail address, of course AND no matter how many times I try to edit this, it still keeps putting the hyperlink in my response here!!!  That entire link has no spaces... that envelope icon is supposed to be helpful, but it's making me nuts) in the hyperlink box at the top of the Muse design page so that the person's default e-mail client will pop up to send me an e-mail when they click on that link on my site.
    As far as part one goes, I don't do any login forms.... but I do create and use long forms for like applications and whatnot and I do have to code them outside of Muse because when I try to drop the code into the HTML box, it ends up not looking right.  I look forward to hearing the replies on the login box issue.
    Good night.

Maybe you are looking for