The following diagram represents the system:

enter image description here Here comes some more description:

  1. The system input (ref or reference is zero). And actually the goal of the controller is to maintain the output of the system at zero.

  2. In this system, there are also disturbance and noises. The disturbance has the shape of roughly a ramp, however by nature more like random events. The noises are band limited with bandwidth around 10Hz.

  3. So the controller strives to compensate the influence from disturbance while get rid of noises.

  4. As the noises are from sensors and I add a filter before the controller.

My questions are:

  1. I was using simple FIR filters. The filter wait for, say, 5 seconds to get a batch of data and process them and pass the output to controller. The the controller controlls at 0.2Hz.

  2. However, the bandwidth of 0.2Hz still brings too much noise to the system. If the controller waits 20 seconds for FIR, the system will be too slow. I was advised to use IIR, since it is online, instead of FIR for the filter to further reduce noises.

  3. My question is: since IIR contains information of the past measurements, would the controller output still be accurate? It is supposed to adjust only for current errors! IIR brings past errors to the system!

Any other advice to reduce the noises further? Thanks!

  • \$\begingroup\$ What kind of controller do you use? \$\endgroup\$ – Haris778 Mar 18 '16 at 12:55
  • \$\begingroup\$ it is a PID controller. Am I answering your question? \$\endgroup\$ – richieqianle Mar 18 '16 at 12:56
  • \$\begingroup\$ What's your sampling speed compared to the signals involved? If the FIR is too big (too long) you might want to consider a CIC filter. It uses decimation and interpolation (skipping or repeating samples) along with simple delay elements to achieve filtering more efficiently. (en.wikipedia.org/wiki/Cascaded_integrator%E2%80%93comb_filter) \$\endgroup\$ – user68591 Mar 18 '16 at 13:02
  • \$\begingroup\$ The main problem of fir is it is offline. It needs to wait for a batch of data to be all ready. If 0.02HZ bandwidth is to be achieved, 50 seconds shall be used. I will check cic though, thanks! \$\endgroup\$ – richieqianle Mar 18 '16 at 13:04
  • 4
    \$\begingroup\$ You may be misunderstanding how to use an FIR filter. Normally you don't wait a long time for a new set of data. Each time you get a single new sample, you discard the oldest sample and run the filter on old data plus the single new sample. So if it is 10 taps long you always use the 9 most recent samples and 1 new one, instead of waiting 10 sample periods. The new sample then becomes one of the 9 recent samples next time... \$\endgroup\$ – Brian Drummond Mar 18 '16 at 13:16

For example if you execute a PID at 0.2Hz then you can control a system with a dynamics max. 0.1Hz according to Shannon. Now if you process 16 taps FIR every 100ms you get a delay of 8 cycles which would be 800ms, which is not so bad, but maybe too much for PID executing every 5000ms. But if you run FIR at 10ms, you get only 80ms delay, or you can run every 1ms and extend to 32,64 taps... Your theory that you have to process a batch of data doesn't stand, because you have to purge the oldest sample and bring the new sample and compute everything again, each cycle not a record and start all over again.

  • \$\begingroup\$ Sorry, could you please illustrate why my theory does not stand? I tried to put an IIR into the controller. It started to oscillate. The reason is following: if IIR has very low bandwidth, it contains much information about history. Then the controller controls according to history more than now. \$\endgroup\$ – richieqianle Mar 24 '16 at 14:14
  • \$\begingroup\$ We have filters already and they work fine. What we are doing is trying to improve the performance and it needs us to dig more into the theory. \$\endgroup\$ – richieqianle Mar 24 '16 at 14:24
  • \$\begingroup\$ I sugegst you to ask in DSP forum, they are more experts in this kind, you will get also a good explanation. \$\endgroup\$ – Marko Buršič Mar 24 '16 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.