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

"Copyright © Mitsubishi Electric Europe B.V.

IMPORTANT !

These Function Blocks are demo versions that are only  intended to demonstrate program functions and provide general orientation for  your software choices. They are not suitable for use in real applications! "

"Improper use of demo versions in applications can lead to serious malfunctions  and damage! Programs for real applications must always be configured for the  individual application by trained staff and tested thoroughly before being  used.

Mitsubishi Electric cannot assume any liability if these examples are used in real applications."

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. "Copyright © Mitsubishi Electric Europe B.V. IMPORTANT ! These ...
    • 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 ...
    • GX Works3 - Function block for rounding float numbers with variable amount of significant numbers

      This article contains GX Works3 function block for rounding float numbers with variable amount of significant numbers. "Copyright © Mitsubishi Electric Europe B.V. IMPORTANT ! These Function Blocks are demo versions that are only intended to ...
    • 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, ...
    • GX Works3 - iQ-F - Function for converting LREAL to REAL numbers

      This article contains GX Works3 function for iQ-F CPU that converts LREAL numbers to REAL numbers. This function converts a value from LREAL data type to REAL data type on iQ-F CPU. Input/Output Data Type Description LREAL_IN Word [Signed](0..3) ...