Internal Model Control (IMC) is one type of feedback control.
If the characteristics of the object to be controlled are known, accurate feedback control can be easily achieved.
First, I will explain the concept, and then design a DC motor controller as an example.
It is different from the similar term "internal model principle" used in modern control.

■Concept of internal model control

The following controlled objects output four times the input value.
What kind of controller should be set so that the input to the controller and the output of the controlled object match?

In this case, the controller should output a value that is 1/4 of the input value.
In other words, we can see that we should design a controller for the inverse function of the controlled object.

The above is one of the basic ideas. However, if the characteristics of the controlled object deviate from assumptions (modeling error), they will not match the target values.
Therefore, we will respond as follows.

For example, suppose the controlled object really had the property of multiplying the input by 5.
The controller is designed assuming that the object to be controlled is multiplied by 4, but the target value and the output value still match.
You can find out by entering specific values.

The above is the concept of internal model control. It is generalized as follows. F is filtering, which will be explained later in the example.

＜General system of internal model control＞

■Concrete example of internal model control

Consider controlling the angular velocity ω(t) of the motor and disk of the system below.

＜Motor differential equation＞
The relational expression between voltage and current is as follows (ω: motor rotation speed, Ke: back electromotive force constant). Details here.

The relationship between ω and current is as follows (J: inertia, Kt: torque constant).

(1) and (2) are expressed in a block diagram as follows.

＜Internal model control design＞
First, create only the inverse function of the controlled object as a controller.
Consider giving a voltage v(t) that achieves the target angular acceleration as follows.

Substitute (2) for (1).

Since the above formula is the controller, connect it to the object to be controlled. It is as follows.

＜Designed in Scilab＞
The parameters are below. Here is the contents of the differentiator.

kt=0.5 , ke=0.5 , R=1 , L=0.1 , J=0.1

The simulation results are as follows. The target ω and the actual ω will eventually match, but there is a large deviation at the beginning.
This is strongly influenced by the differential processing of the target ω, and deviations occur when the target value changes in steps.

＜Filtering＞
One way to fix this is to filter the target ω.
Insert a low-pass filter as shown below (set the time constant to 0.1).
The objects to be controlled are made into subsystems.

The simulation results are as follows.
Although there is a slight delay in response, it is possible to quickly follow the target value.

Another point to note when designing a controller is that if the object to be controlled contains dead time, the inverse function of the dead time cannot be taken, so it is necessary to design the controller without the dead time.

＜Dealing with disturbances and modeling errors＞
Fig. 1 is designed with Scilab as follows as a response when disturbance enters or modeling error occurs.

The contents of the controlled object P are as follows. A disturbance of 0.5 is given at 2 seconds, and the characteristics of the controlled object are changed assuming that there is an error in the model.

The simulation results are as follows. It can converge to the target value.

■Consideration of internal model control, further application

① Internal model control techniques
Internal model control requires obtaining the differential equation of the controlled object and its inverse function.
You may think that it is difficult to use this controller, but in fact, you can use the internal model control without setting up a strict differential equation.
Because this is a control that allows for modeling errors.Now let's consider how much modeling error should be allowed. Click here.

② Relationship between internal model control and PID control
Internal model control can be equivalent to PID control of classical control.
In addition, the disadvantages of PID control can be eliminated, and it is possible to design more user-friendly than PID. Here's why.

③ Relationship between internal model control and modern control
You may think that the internal model control is a modern control because it is a differential equation.
Unlike modern control, we do not set up a state equation and measure stability from a characteristic equation, so I personally think that it is closer to classical control.
Click here for comparison with modern control.