Below is a closed-loop system of plant Gp(z) with unity gain. I also enabled to display the sorted execution order.
According to the image, the order of execution is:
1. Reference, r, is initialized to 20.
2. Plant calculates output, y.
3. The error, e, is calculated.
Please correct me if I am wrong. If this is correct, at time 0 shouldn't e have an initial value of 0 since the error calculation hasn't occurred yet?
When designing a PID controller, will e = 0 when t = 0? I want to understand this because it ultimately affects the closed-loop response of the system.