# Removing nonlinear equations from CVVD mechanism

In the previous post An Ideal Continuously Variable Valve Duration, an ideal continuously variable valve duration model was created. This model was useful for understanding how a CVVD model works however it was slow because it introduced nonlinear systems of equations. This post looks at modifying this model to remove these nonlinear systems of equations.

What is a nonlinear system equation and why do they typically make a model slow?

In this case the nonlinear systems being referred to are algebraic loops or coupled equations that utilize an iterative loop to solve. For further details please refer to Introduction to model translation and symbolic processing. To solve these equations the inverse of the Jacobian of the nonlinear system of equations has to be calculated and an iterative process is used, both of which can be computationally demanding.

Also having nonlinear systems of equations in a model can reduce model robustness.

Why does the CVVD model contain nonlinear systems?

To work out what variables are present in the nonlinear systems in the Simulation->Setup on the Translation tab select List non-linear iteration variables as in Figure 1.

When the model is translated with List non-linear iteration variables selected then the translation log displays which variables are in the nonlinear systems of equations as in Figure 2.

There are two nonlinear systems in the CVVD model in Figure 2. One of the nonlinear systems contains the cam shaft slider position and CVVD disc angle and the other contains the cam lobe pivot angle and the cam lobe slider position. The iteration variables in each nonlinear system are dependent on each other and so are solved in an iterative process.

How can the nonlinear systems be removed?

In this case, it seems likely that there is a function for the cam lobe angle that is dependent on the angle of the timing axle and the relative location of the CVVD disc. Finding this relationship would simplify the system and hopefully will remove all nonlinear systems.

Determining the cam lobe angle function

By using geometry it is possible to determine the cam lobe function based on the timing axle and the relative location of the CVVD disc. In Figure 3 the CVVD disc angle is calculated.

It is assumed that when the timing axle angle is 0 that this aligns with the direction of the displacement s as in Figure 3. An angular offset could be included if this were not the case.

The angle of the cam lobe pivot is calculated from the equation in Figure 4 by using the atan2 function in Modelica.

The equations to solve for the cam lobe angle unfortunately make use of atan2. This will return an angle that is wrapped between -pi and pi; however, we require the cam lobe pivot angle to be continuous. Fortunately, in the VeSyMA library there is an external function called VeSyMA.Roads.Functions.External.continuousS which will return the continuous solution from the wrapped cam lobe angle. The equations used to calculate the cam lobe angle are below:

Calculation of the cam lobe torque

In the previous section the angle for the cam lobe pivot is calculated; however, the torque is also required. This CVVD mechanism can be seen as an ideal variable gear, so the equations from the Modelica.Mechanics.Rotational.Components.IdealGear were used to calculate the torque. The gearing ratio is calculated from the angular speed of the timing axle divided by the angular speed of the cam lobe. The equations for calculating the torque are in Figure 6.

Comparison between previous and current model

A test rig was created to run the lobes with the CVVD mechanism in place as in Figure 7.

The new CVVD mechanism ran about 30% faster and has no nonlinear systems. The model is about 5% slower than the fixed cam lobe model.

Written by: Garron Fish – Chief Engineer

Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion