This dir is belong to Control System class contains with Integral Effect on Control System. This code 100% original made by my hand :), please leave some notes if you're going to use it. Thanks!
Variable above is the constant from PI control, we're trying to varies the constant to analyze integral effect on control system
## Process
The BLDC motor control system should be defined as transfer function by initialize its numerator-denumerator and *tf()* function.
```
num_motor = [K];
den_motor = [J*L J*R+b*L R*b+K*K];
motor = tf(num_motor,den_motor)
```
Besides the plant function, the PI-control system defined by `C = tf([Kp Ki],[1 0])`. The vector is set according to PI formula which `PI = Kp * Ki/s`. After that, both of system are multiplied each others without feedback by `complete = feedback(motor*C,1);`
That system will be test with step, ramp, and impulse input by call below lines
![Kp = 1, Ki = 1](https://user-images.githubusercontent.com/77116615/189711219-a3d00c73-0902-4a3f-899c-aca785cf0e6c.png)
![Kp = 1, Ki = 3](https://user-images.githubusercontent.com/77116615/189711238-016657a1-8b3d-4209-8033-192464c00bed.png)
![Kp = 1, Ki = 5](https://user-images.githubusercontent.com/77116615/189711244-acaa9905-21dc-4e80-915e-c628775a6665.png)
![Kp = 1, Ki = 7](https://user-images.githubusercontent.com/77116615/189711248-cdac4205-6511-460d-8eb8-96378564774e.png)
![Kp = 1, Ki = 9](https://user-images.githubusercontent.com/77116615/189711253-c2a2208c-fdb8-4640-b419-b2909250ed0e.png)
Notes: In theory, SSE should decrease following the increased Ki, but i suspect Matlab just can't compute too much floating point. Hence, i add two additional test below with larger constant to show the effects.