0

I want to implement a digital controller C(z) on an Arduino Uno (transfer function in the z domain) in order to control a plant

G(s) = 3750/[(s+10)(s+30)(s+100)].

I have implemented G(s) with electronics (op-amps, capacitors and resistances). I want to realize C(z) on the Arduino Uno. The input to the Arduino is the error signal (reference − output of G) and the output of C(z) is the input of G(s). Finally, I will have a closed loop system with negative unit feedback. The reference input is a unit step signal (1 volt).

My problem is: how can I use PWM and filters in place of a DAC?

Edgar Bonet
45.1k4 gold badges42 silver badges81 bronze badges

1 Answer 1

1

If you want to use PWM in place of a DAC, the normal thing to do is to use some kind of analog low-pass filter. However, many people skip the filter when the signal is meant for some system that inherently acts as a low-pass. Example: dimming an LED, where the human eye is the filter.

In your case, since your plant looks like a third order low-pass filter with cuts at 1.6, 4.8 and 16 Hz, you can probably skip the filter. If you output on pins 5 or 6, the PWM frequency will be around 980 Hz (exactly: fCPU/16384). At that frequency, your plant gain relative to DC will be

G(j2π ×ばつ 980 Hz) / G(0) ≈ 1.3 ×ばつ 10−7 j

Probably low enough to not be an issue.

answered Jul 9, 2015 at 8:28
2
  • Generally have you got any other information for this project; Commented Jul 10, 2015 at 13:25
  • No, and I guess you know the project better than I. Commented Jul 10, 2015 at 13:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.