I built an analog PD controller to control the position of a proportional solenoid. The derivative part operates on the feedback pot voltage.

I used that as a guide for a digital version, implemented in assembly language, running on a Freescale 9S12 processor.

The analog version is stable, but the digital version wants to oscillate with a period of about 45 msec.

The proportional gain (kP) of each is 3.

The derivative part of the analog design has a 300 ohm resistor in series with a 0.1uf cap, with a 300k feedback resistor.

I set up a 1 Hz square wave to run the solenoid from the analog version so I can observe the various outputs from the digital version while it is open loop.

For viewing, I write the signal of interest to a port connected to an R2R ladder network.

The derivative output from the digital version resembles very closely that from the analog circuit, but it is delayed about 8-10 msec.

The routine runs once a millisecond. To reduce noise and get a useable signal for differentiation, I sample the feedback pot once every four msec.

Does the digital version have a chance of working, or is there too much delay?

The solenoid is fairly large and operates on 24vdc, and has a return spring with a force of 10lbs/in. It requires about 3A at 50% duty cycle to get it to move.

You can view the screen capture of the derivatives here:

http://picasaweb.google.com/JohnPizzuto/JSVampireInstallation?pli=1&gsessionid=ri0qbS3mo-_1SrrwfVQ5ZA#5298720393124245314

Find more forums on Science and Technology | Create your own forum at Network54 |

Copyright © 1999-2018 Network54. All rights reserved. Terms of Use Privacy Statement |