Abstract

Model-based methods are used in industry for prototyping concepts based on mathematical models. With our forest industry partners, we have established a model-based workflow for rapid development of motion control systems for forestry cranes. Applying this working method, we can verify control algorithms, both theoretically and practically. This paper is an example of this workflow and presents four topics related to the application of nonlinear control theory. The first topic presents the system of differential equations describing the motion dynamics. The second topic presents nonlinear control laws formulated according to sliding mode control theory. The third topic presents a procedure for model calibration and control tuning that are a prerequisite to realize experimental tests. The fourth topic presents the results of tests performed on an experimental crane specifically equipped for these tasks. Results of these studies show the advantages and disadvantages of these control algorithms, and they highlight their performance in terms of robustness and smoothness.

1. Introduction

Hydraulic technology has had a great impact on the development of modern industry, and it prevails as the primary component in mechanized heavy-duty equipment. We see a breakthrough of this technology in the forest industry, a business that has profoundly advance from manual labor to the use of very sophisticated machinery. The timber exploited with these machines provides the raw material for countless industrial products.

1.1. Overview of Forestry Machines

In the forest industry, success relies on first-class products and competitive costs. Therefore, forestry machines are equipped with highly robust and efficient hydraulic technology. Yet, the efficiency and the work profit depend heavily on the operators working with these machines. This working assignment is difficult and demands highly skilled people. For this reason, operators, particularly beginners, practice the work tasks by combining real and virtual training [1, 2].

A typical job description involves working all year round in difficult and isolated areas. This working situation is unattractive for many people and, as a consequence, attracting new operators is becoming increasingly difficult. This problem is one of the primary motivations to design smart forestry machines that will help boosting up productivity [35]. In fact, most machine manufacturers are already pioneering the development of machinery that can be more intelligent, user-friendly, and easier to learn.

1.2. Overview of Control of Forestry Cranes

Controlling cranes through manual open-loop commands is a mature technology used for more than two decades. It primarily consists of a mechanical manipulator actuated with hydraulic cylinders. These cylinders produce the motion and they are controlled with hydraulic valves. The operator controls the machine from a chair located inside the cabin, an ergonomic chair equipped with joysticks and buttons. Maneuvering the joysticks produces motion, and because neither the crane nor the vehicle is equipped with sensors, controlling all degrees of freedom is challenging and burdensome. This scenario results in unintuitive technology, technology that is difficult to use and learn.

Work on other crane control modes is a subject of research for almost thirty years [69]. Most research aims to simplify the control complexity by providing more intuitive methods. One example is to directly command the end-effector motions rather than the motion of each individual link. Methods of this kind can be seen in a line of work found in [1017] and references therein. Many of these solutions are now practical and will be essential for developing a new line of machines. A pioneering of this is already seen in a trend of commercial solutions appearing on the market, such as cranes with built-in sensors [18], smoother motion control [19, 20], and Cartesian end-effector control [19, 21], just to mention a few.

The success in the performance of motion control methods depends on closed-loop control algorithms. In the literature, we find a variety of generalized methods that can be applied to manipulators actuated by hydraulic systems. These methods range from semilinear controllers [2226] to nonlinear control methods [27], such as feedback linearization [28, 29], passivity-based control [30, 31], and adaptive nonlinear control methods [32, 33], among many others.

From the variety of methods, Proportional-Integral-Derivative (PID) control is often adequate in most applications requiring closed-loop control [22, 34]. However, PID control lacks the ability to cope with unprecedented variations in model parameters and external disturbances [12]. For these reasons, we are going beyond traditional PID structures. Instead, we are opting for robust nonlinear control algorithms having better performance [35]. One of these methods is sliding mode control (SMC), a nonlinear control technique highly successful in industry.

1.3. Overview of Model-Based Design as a Tool to Go from Research to Product Development

Model-based design (MBD) is currently applied in a variety of industries. Just as computer-aided design (CAD) provides a geometric way of describing equipment, MBD helps to incorporate dynamics and performance requirements to properly describe an overall system in a simulation environment. Moreover, modern MBD benefits from automatic code generation that facilitates rapid prototyping.

In the forest industry MBD is important to develop new embedded control solutions. The interest is to use models all along the development cycle: from design to implementation. This working method is cost-efficient and facilitates collaboration among engineers of different disciplines and knowledge levels. For the machine manufacturers working with us, this is an attractive option because it helps to adopt new technologies without great efforts. This is a workflow that we have established for more than a decade and some of the results can be seen in our line of work [12, 14, 15, 23, 24, 3640].

1.4. Paper Organization

The remaining of this paper presents a procedure to design motion tracking controllers for a forwarder crane. We use SMC theory, but the mathematical models are explicitly formulated for those who would be interested in applying other nonlinear control methods. In terms of development, our aim is to show a complete description of the models and the methods applied for a variety of tasks, including simulation, model calibration, control synthesis/tuning, and verification/validation. The resulting control systems are automatically deployed in the machines’ main computers and we are interested to know how they perform without further online tuning. This is a challenging requirement, as the performance of the control loops relies extensively on the models used for design. With this control method, we are seeking a trade-off among good tracking performance, robustness, and smoothness.

The paper is organized as follows. First, the mathematical models are presented in Section 2. Second, we formulate the control laws in Section 3. Third, with the purpose of implementing the controllers in both simulation and practice, Section 4 presents an offline model calibration method using recorded data. To conclude this presentation, the results of hardware-in-the-loop tests are discussed in Section 5, and some concluding observations are given in Section 6.

2. System Modeling

We model the system based on first principle laws describing the interaction in between the mechanical crane and its hydraulic actuation. Briefly, this task consists in describing the mathematics for(i)the rigid body dynamics, including friction forces,(ii)the mechanical torque that results from the force exerted by the hydraulic actuators,(iii)the hydraulic dynamics produced by the circulation of oil from the pump and reservoir to the hydraulic actuator.

Due to the complexity of this task and in order to provide a detailed review and exemplification of our findings, the inner boom denoted by in Figure 1 is fully analyzed and presented below. The remaining links will be used to alter model parameters and introduce external disturbances during experimental studies. However, interested readers are referred to [3739] for the complete modeling of forwarder cranes.

2.1. Mechanics

Seen as a single link manipulator, the crane dynamics can be approximated by the second-order differential equation:in which denotes the angular position of the link, the torque applied at the joint, and the friction forces. The expressions for and are given bywhereand represents inertial parameters, are length values shown in Figure 2, , and is the constant of gravity. We assume that the telescopic opening is static and fully retracted; that is, . In contrast, can be placed at different positions, but for the nominal model it will be located at its minimum (rad). Both and will be varied to test performance to unmodeled dynamics, parameters variations, and external disturbances.

2.2. Friction Forces

The behavior of the motion differs according to the direction [37]; therefore, we approximate friction forces by a model accounting for asymmetries [41]:where the terms with a denote the mean values for the coefficients of Coulomb () and viscous () friction. In additions, denotes the bias from these mean values.

2.3. Relation between Hydraulic Force and Mechanical Torque

The relation between hydraulic force and mechanical torque is defined by the following expression [34]:where is the force produced by the cylinder and denotes the change of the cylinder’s piston displacement with respect to the link’s angular position. Referring to Figure 2, this relation is given by differentiatingin respect of , which yields

2.4. Hydraulic Cylinder Dynamics

The actuator’s force (see Figure 3) can be calculated from measurements of pressures aswhere , denote the areas of chambers , respectively and denotes their pressures. Due to the configuration of the electrovalve (see Figure 4), the pressure in chambers and behaves differently. Dynamics of the pressure in chamber can be derived from the mass balance equation:where denotes the Bulk modulus, the hydraulic volume, and the input/output flow. Looking at the schematics in Figure 3, the volume in chamber can be defined asand the rate of change in volume is given by the derivativeConsidering internal leakages, dynamics of the pressure inside chamber can be mathematically approximated by the differential equation:where denotes flow into chamber , is the coefficient for the internal leakage, and is the coefficient of leakage out of the cylinder.

The pressure on chamber follows another dynamical principle, because it is connected to the tank directly (see Figure 4). This configuration is known as regenerative and it is used to gain potential energy regeneration [42]. The nominal pressure in this chamber is equal to the tank atmospheric pressure, and we model the small variations as a system formed by a resistance and a capacitance [22, 34]; the capacitance is the chamber, and the resistance is the hose where the oil flows:where denotes the tank’s pressure and the capacitance constant [34].

2.5. Electrohydraulic Valve

To drive the oil, the system uses proportional bidirectional valves. These valves have orifices with variable areas controlled by the internal spool’s displacement. The flow through an orifice is given by the general equation:where is the cross section of the orifice, is the pressure drop across the orifice, and is the density of the fluid. The discharge coefficient is and we assume it is constant. Considering that the area depends on the spool displacement and that , are nearly constant, we can rewrite (14) aswhere denotes the valve constant. Additionally, we can assume that because the electronics have fast dynamics in comparison to the overall process. Referring to Figure 4, is the electrical input to the valve and, therefore, it is the control signal for the process. Without loss of generality, any nonunity gain between and is taken care of by the constant ; that is,Based on these observations, the flow can be modeled aswhereand is the pressure supplied by the pump.

In hydraulic systems, a well-known nonlinear phenomenon is asymmetry; that is, the response of the system differs according to the direction of motion. This phenomenon is mathematically described by (17) and (18), where the flow changes according to the sign of the control signal . This implicates that the model parameter can be direction dependent. To place this in mathematical terms, we can consider from (17) and (18) thatwhich can be shortened as

2.6. Hydraulic Force as a Function of the Control Input

The differential equation describing dynamics of the hydraulic force can be found by differentiating (8); that is,which in combination with (12) and (20) yields the change of force as response to the input signal in the simplified form:where

2.7. Mechanical Motion as a Function of the Control Input

To determine the dynamics of the output position as response to the control input , we take the time derivative of (1) aswhereso that (24) is rewritten asin whichEquation (26) is important for control design because it shows the input/output relationship. Additionally, the model (27) is explicitly written to apply most nonlinear control methods.

3. Nonlinear Control Design

Discrepancies, or mismatches, are always present when we compare real behavior againts mathematical models. These differences arise from external disturbances, unknown parameters, and unmodeled dynamics. Designing control laws in the presence of these uncertainties is a very challenging task for a control engineer. Therefore, developing robust control methods is an interesting but difficult subject. One particular robust control approach is the so-called sliding mode control (SMC) technique. Robustness, finite-time convergence, and reduced-order compensated dynamics are advantages of this method. Two variations of this control technique are presented below.

3.1. First-Order Sliding Mode Control

The first step to design SMC is to define a sliding surface/function corresponding to the dynamics of the error between the system’s response and the desired behavior [35, 43]. A sliding mode exists if converges to zero in finite time and , a fundamental condition for SMC. To design this controller, we start by defining a -smooth desired trajectory and the error between and asThus, the sliding mode follows thatwhere is the dynamics of the error (28) and it can be selected as any dynamical system that drives the error dynamics to an exponentially stable behavior. For instance,Note that, on the surface , the error dynamics are governed by the relationIn order to achieve asymptotic convergence of the error to zero, that is, , with a given convergence rate and in the presence of a bounded disturbance , we have to drive the sliding surface in (30) to zero in finite time by the control input . To design this control input, we differentiate (30), yieldingThus, by introducing (26) in the equation above, that is,we find the relationship between and . The problem is to design a feedback control law that drives this system to zero asymptotically. One choice is [35, 43, 44]where is the main control action to account for nonlinear dynamics. On the other hand, plays three roles: (1) it determines the reaching time to the sliding surface, (2) it gives robustness to model uncertainty, and (3) it provides disturbance rejection. These two can be postulated as follows:where is the signum function and the larger , the shorter reaching time. In this form, the stability condition is satisfied. We refer the reader to the stability analysis presented in [35].

3.2. Second-Order Sliding Mode Control

As defined in the work [45], a second-order SMC is defined by the sliding surface:which represents a set of band-pass filters that are tuned according to and . The integral term is used to reach zero steady-state errors. The unfactored form of (37), with , yieldswhere are constant values that ensure an exponentially stable behavior. The purpose of the second-order SMC is to make . The control action can be found by taking the derivative of (38) as presented below:such that stability is guaranteed if the controller (34) is designed as [45]where , .

4. Controller Implementation

Referring to Figures 1 and 5, the machine is equipped with the following hardware: (1) three angular and one linear position quadrature encoders with a resolution of 4000 pulses/rev, (2) eight analog pressure transducers with a range of bar, and (3) one off-the-shelf rapid prototyping platform with a sampling frequency of 1 kHz [46]. This hardware is used for recording data, real-time visualization, and testing.

Most nonlinear control methods use mathematical models as an attempt to cancel nonlinear dynamics. To compute reliable input signals in practice, the model parameters have to be known with a certain degree of certainty. However, a common engineering problem is to have unknown parameters that represent physical properties.

The geometry of the system is usually known from CAD drawings. The remaining unknown parameters, masses, inertias, and friction values, have to be found through experimental system identification. This method serves to calibrate the model for simulation and to tune control laws for real-time implementation [47]. The steps used with this purpose are presented below.

4.1. Model Calibration

We use three different sets of equations, that is, (1) for the mechanical system, (12) for the pressure dynamics of chamber , and (13) for chamber . The coefficients for the valve are found intrinsically within (12). For (1), the unknown parameters relate to the inertial terms denoted by and the friction coefficients of the model (4). Similarly, for (22), the unknown parameters relate to the flow coefficients in (20), the Bulk modulus , and the coefficients of leakage in (12).

4.1.1. Estimation of the Mechanical System Coefficients

We apply algorithms of least-square regression. To this end, we start by rewriting the system (1) aswhereGiven measurements of and for a finite time , the parameters of can be found by least-square regression [47]:The estimation of velocities and accelerations is done by Kalman filtering [48]. We use periodic input signals to identify nonlinear behavior [39, 49]. Three cases of recorded data are presented in Figure 6. The results of the estimation with (43) are presented in Figure 7, results that compare the simulated torque against the measured one.

4.1.2. Estimation of the Hydraulic System Coefficients of Chamber A

This is done based on (12). To this end, we rearrange the mathematical expression as which combines (12) with (20) and conveniently expresses the estimate of the input signal as the dependent variable. This relation is chosen over to avoid numerical differentiation errors. (The pressure is measured with analog transducers. Hence, its derivative has to be found by numerical differentiation.) Our aim is to estimate , , , , and that best reproduce the behavior of the measured signal . For this task, we use an objective function to quantitatively compare the model behavior to the measured data:where is the quantity to be minimized and it accounts for the error between the predicted and observed data. For our particular purposes, this algorithm is programmed in MATLAB applying the Global Optimization Toolbox [47, 50]. This toolbox gives the possibility to work with large amounts of recorded data sets and find global solutions. The search is constrained by defining boundaries according to theoretical values.

An example of the data set is presented in Figure 8. The comparison between and is shown in Figure 9. These results demonstrate that the models are able to capture the motion dynamics with sufficient accuracy.

4.1.3. Estimation of the Hydraulic System Coefficients of Chamber B

This is done based on (13). Rearranging the mathematical expression in the linear formwe apply least-square estimation . The data used for the estimation is presented in Figure 8, while the results validating the estimation are presented in Figure 10.

4.2. Reducing the Sliding-Mode Chattering

Chattering is a common problem of SMC, a behavior that is inadvisable in electrohydraulically actuated servomechanisms. Chattering leads to low control accuracy and it can provoke the wearing of the moving actuators or damage the servo valves. Different methods exist for avoiding chattering. Among these methods, one that performs satisfactorily in practice is via state-dependent time-varying switching gains [43]. One example for first-order SMC is the modification of (36) bywhere the gain varies proportionally to the value of the sliding surface . The constant is a sufficiently small value.

Unlike first-order SMC, the second-order option (40) leads to a control law that is free of chattering. This is one of the benefits of higher order sliding-mode dynamics. However, higher order SMC can also benefit from state-dependent modifications to improve performance. One example is to modify (40) as

4.3. Mathematical Considerations

In some cases, control algorithms present mathematical operations that might not be feasible in the formal sense. For instance, the control law (24) needs the derivative of the friction forces defined in (4). Friction forces involve the signum function; therefore, the derivative at zero crossing is undefined in the ordinary sense. It is always possible, however, to consider two separate dynamical models according to the direction of the movement. In that case, the Coulomb friction reduces to a constant value, since is equal to or . The derivative of this constant is zero and can be assumed as such in a small vicinity of zero velocity. In this way, the relation can be numerically implemented. We follow similar concept to implement the control laws (47) and (48).

5. Experimental Results

After detailing our model-based control design, we proceed with experimental results. To begin, we recall that our aim is to investigate how our controllers work without the necessity of online tuning.

Cranes and particularly the hydraulic actuation present three different challenges. First, these manipulators have long reaching distance and, therefore, they are highly flexible specially while lifting logs. Second, the hydraulic cylinders work as actuators and suspension systems simultaneously. As a consequence, they are highly flexible to avoid mechanical stress while lifting loads. Third, these cranes can lift up to twice their own weight, an amount that introduces high uncertainty in model parameters. All of these problems make control design quite challenging, and our aim in this section is to verify the SMC performance to these effects. Our interest is to obtain a trade-off in between good tracking performance, robustness, and smoothness. The smoothness can be observed by the amplitude of oscillations in the hydraulic pressure and the robustness by the ability to cope with unmodeled dynamics or external disturbances. To introduce these effects, the telescope ( in Figure 1) is placed at 70% of its maximum opening, a situation that introduces serious flexibility and causes oscillatory response. Similarly, the outer boom ( in Figure 1) is placed to 10% its maximum range, and the gripper is loaded with logs of an approximated weight of 130 kg. All of these changes alter our nominal conditions and will be helpful to observe the control performance. The results are organized as follows: (1) Figures 11 and 12 show experimental validation of the first-order SMC; (2) Figures 13 and 14 show experimental validation of the second-order SMC.

5.1. Results with First-Order SMC

For Figure 11, the initial conditions were varied to verify the asymptotic convergence to the desired trajectory. The modified control law (47) has a faster settling time, but the tracking accuracy slightly reduces. This is observed in the first row of Figure 11, where we show a superimposed plot of angular position measurements and the desired trajectory. We also observe that the chattering phenomenon is reduced by the control law (47), as we show in the second row of Figure 11. Reducing chattering allows for achieving smoother movements, as it is observed in the third row of Figure 11, where the control law (47) shows less oscillatory amplitude.

For Figure 12, we modified dynamics by changing the links configurations and including load. The crane was initially positioned far from the desired trajectory to verify asymptotic convergence. Despite the changes, the controller is able to keep all characteristics described earlier. In addition, the modified control law (47) behaves better than the original one.

5.2. Results with Second-Order SMC

For Figure 13, the crane was initially positioned near the trajectory to verify the tracking performance. The modified control law (47) has a slower settling time, but the tracking accuracy in both cases is nearly similar. This can be observed in the first row of Figure 13 that shows a superimposed plot of angular position measurements and the desired trajectory. We verified that second-order SMC can suppress chattering, a result observed in the second row of Figure 13. The state-dependent control law (48), however, improves smoothness, as it can be qualified by the torque observed in the third row of Figure 13. In both cases, we see improvements of higher order SMC if we compare Figure 11 with Figure 13.

For the results in Figure 14, we modified dynamics as explained earlier. The crane was positioned relatively far from the desired trajectory to verify asymptotic convergence. The modified control law (47) has a faster settling time; however, the tracking accuracy in both cases is similar. The first row of Figure 14 shows this behavior with a superimposed plot of angular position measurements and the desired trajectory. In addition, the second-order SMC suppresses chattering without the modification (48), but the state-dependent control law (48) improves smoothness. Figure 14 shows these properties.

6. Conclusion

The main objective was to present a model-based development workflow. In control engineering, this working method involves using mathematical models to design controllers. Successful application of model-based design involves modeling, control design, simulation, and practical verification. We have presented all of these steps with sufficient details.

The subject of study was output tracking motion control for a forestry crane actuated by hydraulic cylinders. This system presents challenges related to flexibility, oscillatory response, and unpredictable model uncertainty. Achieving desirable performance under these effects is a difficult control problem.

In relation to system modeling, we have presented first principle laws that explain the motion dynamics. We believe that this is an important step, because (1) the hydraulic configuration used in these systems has different characteristics to what is commonly found in literature and (2) these mathematical models are essential to derive nonlinear control laws. The model parameters were found by system identification tests. The simulation results showed agreement between the experimental data and simulated quantities.

For control design, we have presented nonlinear sliding mode control techniques considering two alternatives: first-order SMC and second-order SMC. For both cases, we have tested the case of static and state-dependent control parameters to reduce chattering. Results of experimental tests suggest that state-dependent control has better performance over static gains. Additionally, for tracking and model uncertainty, second-order SMC performs slightly better than the first-order option. Nevertheless, we experienced that first-order SMC is easier to implement and the benefits of higher order SMC might not be so much better to justify the efforts of implementation. We conclude that first-order SMC with state-dependent parameters meets all of our expectations.

As a concluding remark, the control laws were tuned applying the Robust Control Toolbox of MATLAB. The results presented show the performance of control parameters found with this software; online tuning was not done. We implemented these controllers using automatically generated embedded code, thus completing out model-based development workflow.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

The development of this project has been financially supported by the Kempe Foundation, the Swedish Cluster of Forest Technology (Skogstekniska Klustret), Holmen Skog, Sveaskog, and the UMIT research Lab of Umeå University.