iQ-F PWM outputs controler for PID temperature regulation

iQ-F PWM outputs controler for PID temperature regulation

This article describes the function block to control heating/cooling outputs with PWM for temperature control using PID
Ten artykuł opisuje blok funkcyjny do sterowania wyjściami grzania/chłodzenia wykorzystując PWM dla kontroli temperatury poprzez regulator PID

1. Function block

      1.1 Description

This function block for iQ-F PLC is used to control binary heating/cooling outputs using PWM when using PID regulator for temperature regulation but also can be used as standalone PWM controller.

      1.2 Inputs/outputs

Input/output
Data type
Description
i_iEnable
Bit
Enable signal
i_ibUse_Cooling
Bit
To use (TRUE) or not to use (FALSE) cooling output
i_iPWM_Cycle_time
Word (Signed)
Length of PWM cycle in miliseconds
i_iPWM_Minimum_Width_time
Word (Signed)
Minimum width time in one cycle in miliseconds
i_iPWM_Maximum_Output_Value
Word (Signed)
Maximum value of Manipulated Value (Mv) from PID
i_iPWM_Minimum_Output_Value
Word (Signed)
Minimum value of Manipulated Value (Mv) from PID
i_fSet_Value
Float
Set Value of temperature (Sv)
i_iPID_Value
Word (Signed)
Manipulated Value from PID (Mv)
o_bHeating_Output
Bit
Output for heating
o_bCooling_Output
Bit
Output for cooling
o_bError
Bit
Error signalization

2. Operation types

      2.1 Operation without cooling output

When operating with Use_Cooling input set to FALSE, controller use only heating output. Output pulse width is calculated from range  but when calculated width is smaller then minimum width time, heating output will remain off for this cycle. Width time is calculated from formula:


      2.2 Operation with cooling output

When Use_Cooling input set to TRUE and value from the PID regulator is greater then Set Value controller operates using formula from above to control heating output. When Manipulated value is from range   width time of cooling output is calculated from formula:



3.  Application

      3.1 Setting PWM cycle parameters

            3.1.1 Cycle time


PWM cycle time should be set with lifespan of relays in mind - 2s to 5s is a good value. Also PID Sampling time should be set to the same value.

            3.1.2 Minimum width time



This value should be set to be greater then transistor output response time and also minimum switch time of a SSR relay.

            3.1.3 PID output Manipulated Value range



This range should be set to be the same as Upper Limit Value and Lower Limit Value of PID

            3.1.4 Set Value and Manipulated Value

Set value should be the same variable as the set value in PID. Manipulated value from PID should be directly connected to PID_Value input of this function block.





4. Monitoring

In attachment there is a  "log_viewer_monitor_settings" file for monitoring regulation in GX LogViewer for example project:




To open this file while starting log viewer you need to select:



    • Related Articles

    • iQ-F PID controller function block

      This article describes implementation of a PID instruction inside a function block for iQ-F PLC. Ten artykuł opisuje blok funkcyjny dla sterownika iQ-F implementujący instrukcję PID. 1. Function Block This function block is a iQ-F PID instruction ...
    • Determination of PID parameters using table method

      W dokumencie opisane są tabelaryczne metody doboru nastaw w oparciu o model inercyjny pierwszego rzędu. Parametry modelu wyznaczane są z użyciem narzędzia Realtime Monitor Function Summary: This document describes PID tuning using step response ...
    • Funkcja PWM

      W niniejszym artykule zostanie przedstawiona funkcja PWM czyli funkcja modulacji szerokości impulsów w sterowniku FX5. This article presents PWM function i.e. the pulse width modulation function in FX5 plc controller. Funkcja PWM jest to funkcja, ...
    • Summary of the programs included in iQ Works suite

      This article summarizes all the software included in the Mitsubishi iQ Works software suite. An iQ Works license code is required for all programs to work. Link to the software presented in the ...
    • Połączenie zdalne przez VPN ze sterownikiem PLC programowanym w środowisku GX Works 3 (IQ-F IQ-R)

      The article describes remote connection method via VPN with IQ-R and IQ-F programmable controller (GX Works 3) Artykuł opisuje podłączenie zdalne z VPN do sterowników serii IQ-R i IQ-F (GX Works 3) 1) Projekt na PLC Utwórz program na sterownik PLC, ...