| Electronics > Beginners |
| Measuring Step Response of Servo Motor |
| (1/2) > >> |
| Mattjd:
So I took a controls class and learned all the math and stuff about implemented an analog PID controller. I had a final project which was to move adjust a mount that held a small solar panel such that it had the greatest light incidence. We have photoresistors to measure the light levels, 4 of them, and moved the mount in two directions using servo motors. Now the servo motors worked by sending PWM signals to them with a period of 20ms. Easy enough to implement on a micro. The process I went through with completing that project was nothing like I had ever done in the class and it was fairly frustrating. In class, we had a system, and its step response. We then did all the math to develop a PID controller to give the desired settling time and %OS. What I did in reality was not that, and felt like hackery. Ive read things of people measuring the response of their system and then uploading it to matlab and using simulink/control toolbox to get the right values of Kp,Ki,Kd and then converted it to appropriate values in Z domain and implement a digital PID controller. That is what I would like to do, but I am at a loss of how I would measure the step response of my system. The system was as in this https://browndoggadgets.dozuki.com/Guide/Dual+Axis+Solar+Tracker+2.0/14?lang=en I purchased the wood from them, and I used photoresistors just as them. The opposite is that I used an msp430 instead of an andruino. So my question is, for that system, how would I measure its step response in 1 axis? If that is even possible? Or is there some kind of mathematical model (a transfer function if you will) for a servo motor driven by a pwm that I am unaware of. |
| JS:
For that application you need quite slow response! An over dampened system is better than a well calibrated PID, so I'd suggest to leave the D aside and use a PI control for this, with slow response, with little gain on the integrator with saturation and a LPF at the output making the changes slow enough. If you like you can measure the step response, make a simple program with a uC to change the position from 25% to 75% and measure the position. One way to measure the position could be tapping into the servo potentiometer and read the position from there. JS |
| ignator:
When I started my avionics career in an autopilot group, one of the first tasks they gave me was to perform a servo oscillatory analysis. I used the analog H bridge of the autopilot servo amplifier, and drove this with a function generator (square wave). The motor was loaded with what was a purchased device called a McFadden servo loader. I had the loader simulate a spring load that would drive into the torque limit of the test servo. I made a Bode plot of frequency vs peak angular displacement of the servo shaft. Is there a way that you can drive your system with a command signal that sweeps frequency. I understand you want to know step response. If you plot the motor shaft angle vs frequency (square wave drive), I think you can determine step response of this. The servo amplifier used for auto pilots are torque limiting, so in our case it was a transconductance amplifier, where I could set different current limits with a programming resistor. My test report was a set of curves for various current limits. The end intent was to give this to the end customer installing our servo in their aircraft, and they did an oscillatory analysis to see if under the event of failure, the aircraft would not be broken. |
| ivaylo:
I think he does exactly what you are asking here: https://youtu.be/th0acX5omRM |
| johnwa:
The class you took is probably called something like "Linear Control Systems". Well, unfortunately, in the real world, things are usually nonlinear, sometimes quite significantly so. Backlash and static friction are major causes of this, and conventional control theory is not always that helpful. So don't feel too bad if you end up with a bit of an ad-hack solution. Sometimes, just adding a bit of a deadband is enough to get things to work acceptably. |
| Navigation |
| Message Index |
| Next page |