Tài liệu hướng dẫn chi tiết xây dựng mô hình điều khiển điện áp đầu ra theo độ rộng xung bằng ARDUINO UNO R3. Đây là tâm huyết của mình và nhóm trong suốt quá trình nghiên cứu và thực hiện với sự giúp đỡ của giáo viên bộ môn lý thuyết điều khiển tự động. Mục đích tôi chia sẻ bài viết này nhằm giúp cho những bạn sinh viên có niềm đam mê với bộ môn điều khiển tự động.
Hanoi University of Science and Technology School of Electrical Engineering - - REPORT OF CONTROL THEORY TOPIC: Design the voltage controller for Boost converter Instructor : Dr.Vũ Thị Thuý Nga Students Student ID Class Nguyễn Tuấn Hùng 20176941 TT.HTDTDH.01 – K62 Bùi Cơng Hồng 20176940 TT.HTDTDH.01 – K62 Vũ Đức Phúc 20170145 TT.HTDTDH.01 – K62 Nguyễn Thế Hiếu 20176938 TT.HTDTDH.01 – K62 Ha Noi, 22-6-2020 Content I Introduction 1.1 Preface 1.2 Operating principle and mathematics model II Controller Design 2.1 Transfer Function 2.2 PI Controller and Arduino setup III Hardware Design 3.1 Theoretical 3.2 Component calculation 3.2.1 Technical numbers 3.2.2 Calculation 3.3 PI controller 3.3.1 System simulation on MATLAB & Simulink 3.3.2 System simulation on Proteus and Altium IV Results I Introduction: 1.1 Preface Nowadays, we are living in modern world, with the development of technology – the 4th revolution, more and more equipment are invented that help people live easier Electricity is the most important things in this world – no electricity no civilized A boost converter is one of the simplest types of switch mode converter As the name suggests, it takes an input voltage and boosts or increases it Out project is DC converter, that means the circuit only working in DC condition The DC boost converter has some significantly characteristics: cheap, high efficiency so it can be used widely The DC boost converter is needed when the DC source in main circuit need to transform into suitable voltage, with the guaranteed requirements are pulse, voltage stability, supplied for electric circuit All things we need are: an inductor, a semiconductor switch (these days it’s a MOSFET, since you can get really nice ones these days), a diode and a capacitor Also needed is a source to generate a periodic square wave So with Researching, we find out Arduino Uno R3 Atmega328P to design our DC boost converter circuit We spent the first week searching for boost converter information Then, Use the next week to perfect the circuit, We assigned the work as follows: - Hung designs software on MATLAB, Proteus and find PID Phuc designs hardware and design PCB circuit Hieu makes a report and find the components of the circuit Hoang codes for Arduino Project status completed 1.2 Operating principle and mathematic model: When switch is turned on: Our signal source goes high, turning on the MOSFET All the current is diverted through to the MOSFET through the inductor The power source isn’t immediately short circuited, of course, since the inductor makes the current ramp up relatively slowly Also, a magnetic field builds up around the inductor We have voltage and current in inductor: 𝑉𝐿 = 𝑉𝑖𝑛 − 𝑉𝐾 ; 𝐼𝐿 = ∫ 𝑉𝐿 𝑑(𝑡) 𝐼1 = (𝑉𝑖𝑛 − 𝑉𝐾 )𝑇𝑜𝑛 + 𝐼0 𝐿 𝑜𝑟 𝛥𝐼𝐿 = (𝑉𝑖𝑛 − 𝑉𝐾 )𝑇𝑜𝑛 (1.1) 𝐿 Note: 𝐼1 is the value of inductor current right before and after the switch is turned off, 𝐼0 is the value of inductor current right before and after the switch is turned on, 𝛥𝐼𝐿 is the current change of inductor during ON or OFF state period, and 𝑉𝐾 is drop voltage of MOSFET since the inductor makes the current ramp up, thus 𝐼1 > 𝐼0 When the switch is turned off: The current to the inductor is stopped abruptly The very nature of an inductor is to maintain smooth current flow So, it does not like the sudden turning off of the current It responds to this by generating a large voltage with the opposite polarity of the voltage originally supplied to it using the energy stored in the magnetic field to maintain that current flow The inductor now acts like a voltage source in series with the supply voltage This means that the output capacitor is now charged to a higher voltage than before: 𝑉𝑖𝑛 + 𝑉𝐿 The voltage and current of inductor now: 𝑉𝐿 = −𝑉𝑖𝑛 + 𝑉𝑜𝑢𝑡 + 𝑉𝐷 𝑓 From equation 3.1, the inductor current: 𝐼𝐿 = 1 𝐼0 = ∗ 0.075 = 0.15𝐴 1−𝐷 − 0.5 Choose to use a 1A, 12V adapter The current change during a period: • Inductor: 𝑉𝐿 = 𝐿 𝑑𝐼 ∆𝐼 ∆𝑡 𝐷𝑇 = 𝐿 → 𝐿 = 𝑉𝐿 = 𝑉𝑖 𝑑𝑡 ∆𝑡 ∆𝐼 ∆𝐼𝑝𝑒𝑎𝑘 𝐿𝑐𝑟𝑖𝑡 = 𝑉𝑖 𝐷𝑇 2𝑖⃗⃗𝑖 ⃗⃗⃗𝑖𝐿 = 𝑖⃗𝑖 𝑃𝑖 = 𝑃𝑜 ⃗⃗⃗⃗𝑜 𝑣 𝑉𝑖 𝑖⃗𝑖 = 𝑅 ⃗⃗⃗⃗𝑜 𝑣 ⃗𝑖𝑖 = 𝑅𝑉𝑖 → 𝐿𝑐𝑟𝑖𝑡 = 𝑉𝑖 𝐷𝑇𝑅 ⃗⃗⃗⃗𝑜 2𝑣 = 𝐷(1−𝐷)2 𝑅 2𝑓 0.5.(1−0.5)2 320 = 2.62500 = 320 µ𝐻 With higher inductance, higher current change we receive We must choose inductor with inductance greater than 320 µ𝐻 => Choose inductor with 𝑳 = 𝟗𝟒𝟎µ𝑯 • Capacitor: 𝐼𝑐 = 𝐶 𝐶= 𝑑𝑉 𝑑𝑡 𝑉𝑜 𝐷𝑇 𝑅.∆𝑉𝑜 =𝐶 = ∆𝑉 ∆𝑡 → 𝐶 = 𝐼𝑐 𝐼𝑜 𝐷 𝑓.∆𝑉𝑜 = ∆𝑡 ∆𝑉 = ⃗⃗⃗ 𝑖𝑜 𝐷𝑇 ∆𝑉𝑜 0.075×0.5 62500×0.01×24 = 2.5µ𝐹 We choose Capacitor with 𝑪 = 𝟐𝟐𝟎µ𝑭 • Diode: The maximum current goes through diode 𝐼𝐷𝑚𝑎𝑥 = 𝐼𝐿 + =1+ 𝛥𝐼𝐿 30%1 = 1.15(𝐴) Choose diode MUR607 can endure 5A • MOSFET: 𝐼𝐾𝑚𝑎𝑥 = 𝐼𝐷𝑚𝑎𝑥 = 𝐼𝐿 + 𝛥𝐼𝐿 =1.15(A) The withstand voltage across the valve is greater than 𝑉𝑜 = 24V, selected by 50VDC Choose MOSFET N channel: IRFZ44N 3.3 PID controller: We have: 𝑉𝑜 𝑉𝑜𝑢𝑡 − 𝐷 ∗ (𝑅 ∗ (1 − 𝐷) − 𝑠𝐿) = 𝑉𝑖𝑛 𝑅𝐶𝐿𝑠 + 𝐿𝑠 + 𝑅 ∗ (1 − 𝐷)2 𝐺𝑠 = 2460 − 0.04512𝑠 4.2394 ∗ 10−5 𝑠 + 940 ∗ 10−6 𝑠 + 51.25 Using MATLAB we draw the system response form: clc; clear all; close all; num=[-0.04512 2460]; den=[4.2394e-5 940e-6 51.25]; sys=tf(num,den); step(sys,0:0.001:1); Use the PID controller, the controller model has format: 𝐺𝑐 = 𝐾𝑝 (1 + + 𝑇𝑑 𝑠) 𝑇𝐼 𝑠 Then, the closed-loop transfer function is: 𝐺 ∗ 𝐺𝑠 𝑐 ∗𝐺𝑠 G = 1+𝑐𝐺 = (2460−0.04512𝑠)∗𝐾 4.2394∗10−5 𝑠 +(940∗10−6 −0.04512𝐾 )𝑠 +51.25+2460𝐾 We use Routh table: 𝑆2 𝑆1 𝑆0 4.2394 ∗ 10−5 940 ∗ 10−6 − 0.04512𝐾 51.25 + 2460𝐾 51.25 + 2460𝐾 So: -1/48 < K < 1/48 Choose K =1/48 (maximum gain where the output of the control ring oscillates with a constant amplitude) Step response with 𝐾𝑃 = 1/48 Use MATLAB we have T= 0.02 Using Ziegler-Nichols method, we have: 𝐾𝑝 = 0.45𝐾 = 0.009375 𝐾𝐼 = 𝐾𝑝 ∗ 1.2 = 0.5625 𝑇 So we have the PI controller 𝐾𝑝 =0.009375, 𝐾𝐼 = 0.5625 3.3.1 System simulation on MATLAB & Simulink With the circuit values and parameters of PI controller calculated above, we build a model of Boost Converter system on MATLAB & Simulink as follows: Boost converter simulation on Simulink Perform simulations with different values of input voltage, load, and set values to retest the model ... 4.2394? ?10 −5