I want to generate C code using Embedded Coder for autotune PID. Using matlab 2019b.
1. Microcontroller used: Rx23T with FPU enabled, so can using single precision floats.
2. Need to autotune of PID for oven application. Have a sensor to read temperature values every 100ms.
3. So inputs have:
a) Reference temperature: float32_t , temperature need to set
b) Current temperature: float32_t, current temperature of oven
4. Outputs need:
a) Autotune PID values
b) 0-65535 value for PWM duty cycle, this will be feed via MCU to a Solid state relay which will control on/off of heater.
5. No plant model/transfer function available, only input mentioned available
6. I hwas trying to make simulink slx file. Attached is snapshot. Some confusion i have is:
a) u+du : How it will be used here?
b) I my application closed loop or open loop autotuner suits?
c) %conv : When 100% will it tell that autotuning completes? What is there is some error? Is there any error also?
d) PID gains: Need to feed back autotune PID games to "Discrete PID controller" block, how to do that?
e) How to get output PWM value from this 0-65535?
7. Is my approach ok? or something wrong?