This is a multi-part message in MIME format. ------=_NextPart_000_0058_01C6AA7C.3A9BE640 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by pch.mit.edu id k6IIAoKE019285 Hi, I=B4ve made an inverted pendulum, following AN964. The actual diagram to control the pendulum to make it states still, is as follows .---------. | Disturb o----. '---------' | | .----------. | .-------. Angle .-. | | .-. | | Angle SP---( X )--o PID o--( X )--o MOTOR o-o-- Corrected '|' | | '-' |Process| | | '----------' '-------' | | | | .-------. | | | Sensor| | '----------------o Signalo----------' | Adapt | '-------' I want to built a second PID to control the arm (see invpen.gif). I think= a nested loop is needed but I can't guess where. If the whole diagram above is considered a single block with a single inp= ut, may be, it can be inserted, in another control in this form like: .---------. | P.AnglSPo--. '---------' | .---------. | | Disturb o----. | '---------' | | | | .----------. | .-------. PendAngle & ARM .-. | | .-. | MOTOR | ARMAngle SP---( X )--o PID o--( X )--o & Pendo-o-- Corrected '|' | | '-' | CTRL | | | '----------' '-------' | | | | .-------. | | | Sensor| | '----------------o ARM o----------' | Adapt | '-------' or this: .-------------------. | Pend.AnglSetPoint.o--. '-------------------' | | .----------. | .-------. PendAngle & ARM .-. | | .-. | MOTOR | ARMAngle SP---( X )--o PID o--( X )--o & Pendo-o-- Corrected '|' | | '-' | CTRL | | | '----------' | '-------' | | Pend feedback '---------' | | .-------. | | | Sensor| | '----------------o ARM o----------' | Adapt | '-------' Well, I have a little movie in mpeg format to show how is working now, bu= t I didn't uploaded yet. Any help in general concepts are welcome. If there are a matlab or simuli= nk explanation, that would be better!. The actual controller is based in a 16F873. Best Regards, Dennis Crawley Argentina ------=_NextPart_000_0058_01C6AA7C.3A9BE640 Content-Type: application/octet-stream; name="invpen.gif" Content-Disposition: attachment; filename="invpen.gif" Content-Transfer-Encoding: base64 R0lGODdhxwF1AfcAAAAAAAAAQAAAgAAA/wAgAAAgQAAggAAg/wBAAABAQABAgABA/wBgAABgQABg gABg/wCAAACAQACAg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6qZRaqZZ6qZiaqZq6qZza qZ76qeESEAA7 ------=_NextPart_000_0058_01C6AA7C.3A9BE640 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 7bit -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist ------=_NextPart_000_0058_01C6AA7C.3A9BE640--