From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ARX Discrete Time Model using Discrete Filter

I'm trying to model a furnace based on a 4th-order ARX model using the Discrete Filter (in Control->Simulation->Discrete) to input the coefficients (ai, bi).  I've used Excel to estimate the coefficients and the fit is more than acceptable.  However, using the Discrete Filter as a transfer function doesn't provide the correct response to a step change.  Am I using the correct function?  As far as I know the exponents on all "z", both numerator and denominator, are negative in the ARX model and the Discrete Transfer Function "z" are all positive, so the Discrete Filter is the best option.  Any suggestions would be appreciated.  Thanks.
0 Kudos
Message 1 of 4
(3,333 Views)
 
Hello,
 
The discrete filter is not a "better" option than the discrete transfer function. You can convert a discrete filter to a discrete transfer function (and vice-versa) with simple arithmetic. If m is the most negative exponent in your discrete filter (z^-m), just multiply the numerator and denominator of the discrete filter by z^m to obtain the discrete transfer function. Either function should be fine for your problem. It shouldn't make a difference, but you might try the discrete transfer function and make sure that there is no difference. At that point, you'll need to recheck your design. Consider looking into the LabVIEW System Identification Toolkit to help you with your model.
 
Hope this helps.
 
Damon
0 Kudos
Message 2 of 4
(3,289 Views)

Hi Damon,

I see what you mean and I tried it a few times to check my work.  Unfortunately I've still got a problem.  I can estimate the ARX coefficients via Excel fairly quickly and also check those given to me by LabVIEW.  When I have LabVIEW estimate the coefficients, they work fine in my Excel model and when I run them through the SI Model Predictor.vi everything seems ok.  However, when I enter them as Discrete Transfer Function.vi coefficients (or Discrete Filter, for that matter) the results don't match up.  This is mildly frustrating since I can enter LabVIEW's coefficients in my Excel version and they agree with what the Model Predictor says they should be, and I can enter Excel's predictions into LabVIEW's Discrete Filter and those work fine too.  Everything is off though when I put LabVIEW's coefficients into LabVIEW's Discrete Filter.  I've included my VI if that could help diagnose the problem.

I appreciate the help. 

0 Kudos
Message 3 of 4
(3,261 Views)

I'm not very familiar with the System Identification Toolkit, but the model that you are getting back from SysId is very suspect. Notice that all the coefficients in the numerator are extremely close to zero. I did a bit of asking around, and was told that ARX modeling is best suited for working with random stimulus; not with a deterministic signal like the ramp. I've updated your example to use OE model estimation instead of ARX model.

I also noticed that you were using the "SI Model Prediction" block to test the discrete filter from SysId. If you use the "SI Model Simulation" block, you also get a zero output with the model, which matches results using discrete filters from the Simulation Module and from Control Design. I'm not sure how you are getting the expected response in Excel using the model generated from SysId. If you post the Excel spreadsheet you are using, we may be able determine why there is a difference



Message Edited by dbohls on 06-25-2008 03:31 PM
0 Kudos
Message 4 of 4
(3,208 Views)