20
TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY Department of Electrical Engineering Control and Robotics Lab Design a digitally controlled analog PID controller Designer: Idan Yahav Supervisor: David Gidony 1

Design a digitally controlled analog PID controller Designer: Idan Yahav

  • Upload
    kellsie

  • View
    73

  • Download
    2

Embed Size (px)

DESCRIPTION

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY Department of Electrical Engineering Control and Robotics Lab. Design a digitally controlled analog PID controller Designer: Idan Yahav Supervisor: David Gidony. PID controller - Intro. - PowerPoint PPT Presentation

Citation preview

Page 1: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

1

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

Department of Electrical EngineeringControl and Robotics Lab

Design a digitally controlled analog PID controller

 Designer: Idan Yahav

 Supervisor: David Gidony

Page 2: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

2

PID controller - Intro• The PID controller helps get your output where you

want it, with minimal overshoot, and with little error.

• PID stands for: P -Proportional, I - Integral, D - Derivative. We apply this functions on the error signal.

• Verror is the difference between where you want to go (Vset), and where you're actually at (Vsensor).

• Verror = Vset - Vsensor.

Page 3: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

3

PID controller - IntroP

I

D

+ -

Amp Outputprocess

Vset

Vsensor

Verror Vout

Sensor

Page 4: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

4

Term Math Function Effect on Control System

PProportional

KP x Verror

Typically the main drive in a control loop, KP reduces a large part of the overall error.

IIntegral

KI x  ∫ Verror dt

Reduces the final error in a system. Summing even a small error over time produces a drive signal large enough to move the system toward a smaller error.

DDerivative

KD x dVerror / dt

Counteracts the KP and KI terms when the output changes quickly. This helps reduce overshoot and ringing. It has no effect on final error.

PID controller - Intro• The controller performs the PID mathematical

functions on the error and applies their sum to a process

Page 5: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

5

GoalMain goal : To design a digital controlled PID controller.

Part A - Analog• Design the analog amplifiers PID and summing.

Part B – digital:• Design a microcontroller that will control an LCD

screen and a variable gain element.

Page 6: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

6

Chosen Architecture

• Amplifiers supply ±15[V].• Digital supplier 5 ]V[.• Red arrows indicate digital potentiometer.

Page 7: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

7

Part A : analog design• Spec:• Input signal is 0.1 [V]• Functionality BW- 10m-200 [Hz]

• Issues

• Feedback amplifiers : stability check.• Rout and Rin of the P and summing amplifiers.• Check the synergy between the blocks.

Page 8: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

8

P amplifier• Rout=1 ohm• PM is 87• Close loop: BW=19K.

2

1

20

2

R K

R K

2

1

RH sR

Page 9: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

9

D amplifier

Lowers the gain in high frequency and help stabilize the amplifier

1 1R C sH s

R C s

Main conflicts:

• Stability of the block.

• Functionality of the block

Page 10: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

10

D amplifier

1 1R C sH s

R C s

• PM=87• Close loop BW = 200[Hz]

1

12.5

100

8

R K

R

C F

Page 11: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

11

I amplifierCancel the affect of bias voltage

Cancels affect of bias currents

' 11 '

RH sR R C s

Main conflicts:

• Stability of the block.

• Functionality of the block

Page 12: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

12

I amplifierCancel the affect of bias voltage

Cancels affect of bias currents

' 11 '

RH sR R C s

' 2.5

125

125

8x

R M

R K

R K

C F

• PM=20

• Close loop BW 8m[Hz]

Page 13: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

13

Summing amplifier• Rin=Ri• PM is 87• Close loop BW=17K.

1 2 31 2 3

1 1 1out FV R V V V

R R R

Page 14: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

14

Part B : Digital Design• The microcontroller is like a small computer.• It includes a CPU, memory and I/Os.

In order to design the digital solution we need:• C code (with a CCS compiler).• Interrupts. (do not return to the start of main)• Timers.• Datasheets.

Page 15: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

Part B : Digital Design• For a single press: count = count ± 0.1 (depend on

the button that was pressed).

• For a long press: count = count ± 0.9 the first time and count = count ± 1 on the rest.

• If count >10 :count=count-10.

Page 16: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

Flow chart

1616

Stop timer

Start timer

Count+0.1In=1

Timer=0In=1Timer=1

In=0Timer=x

Start timer

Count+1

Page 17: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

17

Part B : Digital Design• A function that writes to the screen was

implemented

• 2 denounce solution were implemented

Page 18: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

18

Opens and Next steps• Stabilize the integrator.• Design a power supply: ±15 [V], gnd, 5[V] and an

adjustable voltage down to -5 [V].• Implement a code for the digital potentiometer.• Design protection blocks for the card.• Calibration solution.• Design a printed card.• Measurements on the card.

Page 19: Design  a digitally controlled analog PID controller  Designer:  Idan  Yahav

19

Q&A