design physical realization compensator using PID for controlling pisition DC motor..

Discussion in 'The Projects Forum' started by medy, Apr 23, 2012.

  1. medy

    Thread Starter New Member

    Apr 23, 2012
    hye guys,
    i want to physical the simulation of MATLAB for position DC motor using lead-lag compensator. here is the transfer function (23.93s+3.402e004)/(s^2+61.3s+1144). from the t.f i want to convert into hardware,my problem is how i want to convert?how the design of lead-lag compensator in circuit/hardware?the design/hardware of DC motor and the driver. thanks.
  2. panic mode

    Senior Member

    Oct 10, 2011
    common way of controlling DC motor speed is by PWM.
    there are plenty of circuits that show that. you just need one that can use DC voltage as speed control input, for example something like:

    see the VR1? that is an example of voltage input. read closer and you will see that it is inverted, higher voltage means slower speed - but this should give you an idea.

    next you need to get feedback (it is a closed loop system after all).
    you need something that will provide voltage proportional to speed of the motor (for example tacho or encoder and pulse to voltage converter).

    then you are going to need couple basic blocks such as differential amplifier and inverter. how many you need will depend on topology of your transfer function. you can simplify the diagram and number of opamps by choosing right place for inverter(s) for example.

    finally you are still going to need circuits for lead and lag compensator, along with some equations that can relate poles and zeroes to some real component values. along with circuit I put few equations which may give you an idea.

    obviously, all this is going to be lot's of fun. good luck. you'll need it :D
  3. mcasale

    Active Member

    Jul 18, 2011
    "panic mode" is correct about what you need to build a hardware implementation. Another approach is to use an MPU to generate the PWM AND also do the compensation algorithm. You still need to get the "setpoint" and "actual" into the MPU (probably with an ADC of some sort). Then, if you convert your s-domain into z-domain, you can calculate the error and the output in firmware.
  4. medy

    Thread Starter New Member

    Apr 23, 2012
    tq for your information .its help me a lot, but the problem that occur now is the driver and suitable dc motor for position.