## 1. Introduction

With the increasing threat of global warming and the waning of fossil fuel reserves, renewable energy is playing more and more important roles in both environmental and economic aspect of lives. Solar photovoltaic (PV), as one of the most important renewable energy sources, has been widely used in more than a hundred of countries [1]. Solar panels are commonly deployed in harsh environments with high temperature, high humidity and strong winds [2], and are expected to be functional for over 30 years. Thus the glass panel, where the PV material will be located, has to be specially designed to sustain the harsh environments over its life of service [3]. As a necessary validation step, the strength and quality of the manufactured glass sheet must be tested and qualified, especially before the mass production stage. A rigorous test would require the strength of the solar glass sheet to be verified under a controlled environment with simulated temperature, humidity and induced vibration or forces on the PV glass sheet. Although commercial solutions exist for the various types of material-strength testing, environment simulated glass sheet strength testing is not available. As the booming of the PV industry and the increasing researching into stronger and better PV glass sheet, there has been a greater demand into the research and development of specially designed PV glass sheet test machines. This chapter presented the design of an environment controlled force loading machine specifically for solar panel glass sheet strength testing.

The glass sheet testing machine is basically a real-time electro-mechanical control system which is composed of actuators for simulated loading generation, sensors for monitoring and control feedback, a digital controller for the control of the overall system performance and mechanical supporting structures to hold everything together. The key part is the real-time digital controller which serves as the brain of such a system. Although computer-based control system with great computational power is able to host complex control algorithm, testing facilities with space, power and budget constraint cannot afford the size, power and cost of the computer-based design. Moreover, many extended and long hour testing scenarios require great robustness on the control system, where computer with standard operating system cannot meet the requirement. Embedded control systems with much lower power consumption, compact space, less cost and increased robustness is preferred over computer-based systems in many custom designed solutions [4–6]. Although embedded control systems have many advantages, they usually have limited or reduced computational powers that may not be able to host complex control algorithms. This poses challenges into the design of efficient real-time control algorithms. Specific embedded system-oriented control techniques must be carried out to guarantee control performances. For this reason, a simple and effective control law is preferred on the embedded control system and the Cerebellar Model Articulation Controller (CMAC) is a good choice.

The CMAC proposed by Albus [7] is a lookup-table adaptive neural network for estimating complicated nonlinear functions. The basic idea of CMAC is to quantify states from input, find memory addresses of states according to their locations in memory, add the content in the memory address, generate the CMAC output, compare the output with desired output and update the content in memory based on learning algorithms. Compared with other neural networks, advantages of the CMAC [8] are: (1) it is based on local learning and stores information in local memory, hence weights are changed slightly in each step and its learning speed is fast and suitable for real-time control; (2) it owns definite generalization property, so that the close inputs generate the close outputs, and the different inputs produce the different outputs; (3) it can receive continuous input and produce continuous output; (4) it can accelerate the response speed by using addressing mode and (5) it is a nonlinear approximation and robust to the sequences of training data. Owing to above predominant merits, the nonlinear approximating capacity of the CMAC is superior to that of other traditional neural networks and is more suitable for real-time control in the real world.

In summary, various CMAC control algorithms have been formed so far, such as CMAC feedforward control [9–11], CMAC feedback control [12–14], CMAC optimal control [15, 16], CMAC fuzzy control [17–22], CMAC H-infinity control [23] and CMAC adaptive control [24–26]. The previous works can be divided into two categories: one is to improve the control structures of the CMAC, such as the CMAC feedforward control; the other is to improve the learning algorithms with other intelligent techniques, such as the fuzzy CMAC (FCMAC). Although a lot of complicated advanced CMAC control algorithms can well perform the control tasks in the simulations or with the computer-based control systems, the performances raised by some of them are very limited compared with the basic CMAC structure, even several advanced CMAC control algorithms, such as the FCMAC with the wavelet, cannot be implemented in real time with an embedded system due to the complicated improvement algorithms.

In this chapter, we adopt CMAC feedforward and PD feedback control, because [10, 11]: (1) the CMAC carries out the feedforward part to approximate the inverse model of the plant; (2) the PD controller actualizes the feedback part to train the CMAC and guarantee the stability of the closed-loop system; (3) compared with other neural networks or other complicated CMACs, limited computation cost of the simple and effective CMAC plus PD control removes CPU burden, so that the microcontroller can have enough computational power available.

Since there is not much effort dealing with the systematic design problem of an embedded-control glass strength testing machine, the contribution of this chapter is to present a three-step systematic design approach to address the embedded control issue: Firstly, the mathematical description of the system is studied using both theoretical and experimental method. A mathematical model is derived from the physical models of each component used, and an experiment is retrieved by employing Levy’s method to identify parameters of the mathematical model. Secondly, an adaptive CMAC feedforward plus PD feedback controller is designed and simulated based on the identified system model as a preparation for the embedded system implementation. Finally, the proposed algorithm is applied to the embedded system with the same parameters as those of simulations, and experiments are conducted to verify both the identified model and designed controller. To design a machine systematically for practical use, these three steps are closely linked and indispensable. The three-step systematic design approach could benefit engineers in measurement and control as a guide.

Rest of this chapter is organized as follows. Section 2 analyses the system requirements and formulates a mathematical system model. Section 3 performs the system identification. Section 4 proposes the simulation-based controller design. Embedded system-based experiments are conducted in Section 5 and Section 6 concludes this work.

## 2. System Modeling

### 2.1. System analysis

The schematic diagram of the force loader unit is shown in **Figures 1** and **2**. The loader unit consists of one loader and one steel bar, which is connected to the load cell and linear motor actuator. The linear motor actuator, used to apply force, consists of a motor with linear motion and an encoder. The loader is attached to the steel bar and then through a load cell to the linear motor. In short, the force is applied on the material plate by a loader unit which is connected to a linear motor actuator through a steel bar, and the applied force is recorded by a force sensor.

The load applied on the material plate varies as a ramp function. The user can select the slope of the ramp function by setting the maximum force in a finite time period on the touch screen, and can perform the test under different forces ranging from 0 to 300 lbs. The control objective is to ensure the applied force track the reference force command for measuring the material plate’s yield stress qualified or not.

### 2.2. Mathematic model of the motor-loader unit

DC motors are widely used as actuators for high-precision servo control owing to its good working characteristics and simple mathematical model. Mechanical resonance phenomena are ubiquitous because the transmission shaft is not completely rigid and will be distorted under force. For the servo-motor-drive system, considering the mechanical resonance phenomena, the double-mass structure model is commonly used to describe such dynamical systems.

The electrical equilibrium equation can be written as [27]

where *R _{a}* is the armature resistance,

*L*is the armature inductance,

_{a}*i*is the armature current,

*K*is the counter-electromotive force coefficient,

_{e}*θ*is the motor rotating angle and

_{m}*u*is the motor voltage.

_{m}**Figure 3**illustrates the mechanical parameter of the motor with a load.

The motor output torque *T _{m}* is determined by the armature current as

where *K _{t}* is the electromagnetism-torque constant.

The torque equilibrium equation of the motor is

where *J _{m}* is the moment of inertia of the motor,

*B*is the viscidity damping coefficient of the motor extremity and

_{m}*T*is the torque of the load extremity.

_{l}*T*can be represented as

_{l}where *θ _{l}* is the rotating angle of the load shaft and

*K*is the mechanical rigidity of the rotating shaft.

_{s}The torque equilibrium equation of the load is

where *J _{l}* is the moment of inertia of the load,

*B*is the damping coefficient on the load side and

_{l}*T*is the disturbance torque, including the friction torque, the coupling torque and the external disturbance torque. The displacement of the loader mass generated from the linear motor has a linear relationship with the rotating angle of the load shaft, which can be represented as

_{d}The force generated on the solar panel glass has an almost linear relationship with the deformation of the glass, which can be represented as

### 2.3. Mathematical models of other components

The control objective is to track the input command through feedback control based on the signal measured by the force sensor. In addition to the motor-loader and the micro controller unit (MCU), other components included in the control loop are a digital to analog converter (DAC), an amplifier and a load cell. **Figure 4** illustrates the open-loop plant structure.

The DAC converter is basically a zero-order hold. Assume the controller’s output is *u*(*t*), the amplifier’s input is *u _{h}*(

*t*) and the system’s sampling time is

*T*. The zero-order hold can be represented as

Considering the sampling process, by replacing *e*^{−Ts} with

which is a low-pass filter.

In a high-precision servo system, PWM-based amplifiers are commonly used as the motor drivers [28]. The PWM power amplifiers can be represented as

where *K _{a}* is the amplifying multiple and

*f*is the modulation frequency.

_{s}The load cell signal conditioner linearly converts the force into a voltage signal, and its model can be simplified as

### 2.4. Simplified model

Without considering the disturbance torque *T _{d}*, the angles of the motor and the load have the following dynamical relationship

*K _{s}* is very large and the time constant is very small, therefore in the lower frequency range

*θ*(

_{l}*s*)/

*θ*(

_{m}*s*) ≈ 1,

*θ*≈

_{l}*θ*.

_{m}By considering *K _{s}* = ∞ and

*θ*≡

_{l}*θ*, the motor-loader model can be simplified as

_{m}where *J _{a}* =

*J*+

_{m}*J*,

_{l}*B*=

_{a}*B*+

_{m}*B*. Deleting the intermediate variables, the dynamical equation of the motor can be obtained as

_{l}If the motor armature inductance is regarded as *L _{a}* ≈ 0, the system can be further simplified as

And the transfer function between the input voltage and output rotational angle is

where

### 2.5. Open-loop transfer function

The mathematical model of the open-loop plant is the cascade of the units described previously:

Because the system bandwidth is much lower than the system sampling rate and the modulation frequency of the PWM amplifier, the time constant of the DAC converter and the amplifier is very small. In the lower frequency range, the effect of the DAC converter and the amplifier can be omitted. Therefore, the open-loop plant can be simplified as

where *b*_{0}, *b*_{1}, *a*_{1} and *a*_{2} are final parameters.

Obvious, it is a second-order model. Only four parameters need to be identified.

## 3. Parameters identification of the system model

Levy’s method [29] and least square estimation are widely used in system identification. Assume that the identified transfer function is given as

where *b*_{0}, *b*_{1}, ⋯, *b _{m}*,

*a*

_{1},

*a*

_{2}, ⋯,

*a*are real numbers,

_{n}*m*and

*n*are integers, and

*m*≤

*n*.

The frequency response is

For each frequency point *ω _{i}*(

*i*= 1, 2, ⋯,

*L*), it is assumed that the actual frequency response is Re(

*ω*) +

_{i}*j*Im(

*ω*), and the approximation error is defined as

_{i}Define an objective function:

Minimize the objective function, and prompt ∂*J*/∂*a _{j}* = 0 (

*j*= 1, 2, …, n) and ∂

*J*/∂

*b*= 0 (

_{k}*k*= 1, 2, …, m), then two matrix equations will be obtained. By solving the matrix equations, we can get the estimated parameters

*b*

_{0},

*b*

_{1}, ⋯,

*b*,

_{m}*a*

_{1},

*a*

_{2}, ⋯,

*a*.

_{n}**Table 1** shows actual frequency response obtained by experiments. We employ different sinusoidal input *r*(*t*) = *A _{m}* sin

*ωt*with different angular frequency

*ω*(from 0.1 to 1 rad/s) to excite the open-loop system. By theoretical analysis, the output signals are in the form

*y*(

*t*) =

*A*sin(

_{f}*ωt*+

*Φ*). Comparing the output with input sinusoidal signals, we can calculate the values of

*A*

_{f}/

*A*

_{m}and phase delay angle

*Φ*based on the least square estimation as follows.

ω | 1 | 0.9 | 0.8 | 0.7 | 0.6 | 0.5 | 0.4 | 0.3 | 0.2 | 0.1 | 1 |
---|---|---|---|---|---|---|---|---|---|---|---|

A_{f}/A_{m} | 16 | 22 | 25 | 27 | 30 | 31 | 40 | 46 | 64 | 122 | 16 |

Φ | 1.71 | 1.82 | 1.78 | 1.77 | 1.89 | 1.92 | 1.90 | 2.00 | 1.94 | 2.23 | 1.71 |

The output signals can be decomposed as

First, we select the sampling interval *t* = 0, *h*, 2*h*, …, *nh*, where *h* is a step time.

Second, by defining Y *c*_{1} = *A _{f}* cos

*Φ*,

*c*

_{2}=

*A*sin

_{f}*Φ*and

*c*

_{1}and

*c*

_{2}can be derived as

Third, *A*_{f}/*A*_{m} and *Φ* are calculated as

where *A _{f}*.

After *A _{f}*/

*A*and

_{m}*Φ*are obtained, it is easy to estimate the parameters

*b*

_{0},

*b*

_{1},

*a*

_{1}and

*a*

_{2}in Eq. (18) based on Levy’s method. Finally, we get the identified transfer function:

## 4. Simulation-based controller design

### 4.1. Control scheme

As shown in **Figure 5**, in the CMAC plus PD control scheme, the PD controller is used to train the weights of the CMAC at the early stage of control. The output *u _{n}* of the CMAC and the output

*u*of the PD controller are integrated as the control command

_{p}*u*to track the desired input command. Once the system is running, the PD controller will play a main role at the beginning. As the weights are tuned by

*u*,

_{p}*u*will increase to become the main control command. The fast learning speed prompts the leading role of control to switch from the PD controller to the CMAC.

_{n}CMAC employs the supervisory learning algorithm. At the end of each control step *k*, the controller calculates the corresponding output *u _{n}*(

*k*), compares it with total control output

*u*(

*k*), amends the weights and enters into learning process to make error small between the total control output and the output of the CMAC. That means the total control output will be finally generated by the CMAC only via its learning strategy.

The control law can be described as

where *w _{i}* are weights of the CMAC,

*a*are binary vectors,

_{i}*u*(

_{n}*k*) is output of the CMAC,

*u*(

_{P}*k*) is output of the PD controller,

*k*and

_{P}*k*are gains,

_{D}*t*is the sampling time and

_{s}*e*is the error between

*y*and

*r*.

And the learning function of the CMAC is given as

where *E* is the adjusting index, *η* is the learning speed and *η* ∈ (0, 1), *α* is the inertial variable and *α* ∈ (0, 1) and *c* is the generalizing parameter.

Once the system starts running, the controller initializes *w* = 0, then we have *u _{n}* = 0 and

*u*=

*u*at the beginning. At the early stage, the system is mainly controlled by the PD controller. As the CMAC is learning, error

_{P}*e*will decreases, which makes

*u*(

_{n}*k*) increase to become the main control command. Although the CMAC is trained by the output of the PD controller, the output of the CMAC is not a simple imitation of the output of the PD controller. The PD controller helps the CMAC to improve its performances, restrain disturbance and enhance stability of the closed-loop system. If the PD controller works alone, control performances are determined by the gain

*k*to a great extent. If the CMAC and PD controller work together, control performances will be independent of

_{P}*k*, which is flexible in a rational span.

_{P}### 4.2. Simulations

Choose the identified model (26) as the simulation plant to tune the controller and verify its performance. The force control is aimed at tracking a ramp command, of which the expression is given as *r*(*t*) = − 10*t*, where *t* is from 0 to 20 s.

The CMAC plus PD controller is tuned and trained by simulations. **Figure 6** demonstrates that the PD controller plays a main role of control at the beginning. Then the control effect of the CMAC will gradually increase via learning from the output of the PD controller. Owing to the help of the CMAC, control performances are better than those of the only PD controller. Overshoots are reduced dramatically and control actions are speeded up while choosing the ramp signal as an input. **Figure 7(a)** shows an overview of control performances from 0 to 20 s. **Figure 7(b)** is an enlarged view of control performances from 19 to 20s. It can be seen that the system output well tracks the input command. **Figure 8** further exhibits the superiority of the CMAC: the tracking errors are tiny, mostly between −0.2 and 0.2 lbs. Since there exists a modeling error between identified system and actual controlled plant, the controller’s performances will be further validated in the real material-strength testing experiments.

## 5. Embedded system-based experiments

### 5.1. Experiments

For verifying the controller’s adaption to modeling error in the real-time control experiments, we implement above control law in C language and download compiled files into the embedded system. The central processing unit is an ARM7-based processor LPC2294. The LPC2294 is a 32-bit reduced instruction set computer (RISC) processor with low power consumption and high performance. Although there is no Float Point Unit (FPU) in this processor, the 70 million instructions per second (MIPS) processing speed makes it ideal for the real-time control system. The control step size is set as 50 ms.

The actual force tracking control diagram is shown in **Figure 9**. The force is applied to the glass sheet specimen by a loader which is connected to a linear motor actuator through a steel bar. A three point bending test is utilized under this configuration. The load force followed a ramp function with time as the independent variable. The slope of the ramp function can be programmed through the LCD touch screen. The force range can be from 0 to 300 lbs. Displacement of the motor, which also reflected the deformation of the glass sheet specimen, is recorded during the test. The signal flow of the control system is as follows. The DAC generates the control outputs as a voltage signal, which is amplified by a power amplifier and exerted on the linear motor. The linear motor then transforms the voltage signal into rotation, and generates linear displacements. The force sensor and conditioner measure the displacements and generates charges, which are transformed back to a voltage signal and fed back through ADC to the microcontroller.

The input command and control parameters are the same as those of simulations. **Figure 10(a)** shows that the output force basically tracks the input command well and the controller implemented on the embedded system can perform the control task in real time within the control step size. From **Figure 10(b)**, it can be seen that tracking errors of the experiment are mostly between −2.5 and 2.5 lbs, which are larger than those of the simulation. The reason is that uncertainties and disturbances always exist in the real world, which mainly reflects in modeling error. However, the maximum absolute tracking error is 3.79, and the variance of tracking errors is 1.69, which are still acceptable in the actual real-time control environment. Moreover, it verifies that the controller tuned by simulations is also available for actual experiments, and indirectly proves the effectiveness of identified system model.

### 5.2. Comparisons

As shown in **Figure 11**, an inverse model feedforward control is compared with the CMAC feedforward control by embedded-system-based experiments. Its basic idea is to directly employ the inverse model 1/G(s) of the plant’s identified transfer function G(s) in Eq. (26) to be the feedforward part. Obviously, this control scheme is also suitable for real-time implementations; even its computation cost is less than that of the CMAC scheme.

**Figure 12(a)** shows overall performances of the tracking control with the inverse model scheme. It can be seen that the output force basically tracks the input command and the controller implemented on the embedded system can perform the control task in real time within the control step size; however, the tracking control is not performed very well. As shown in **Figure 12(b)**, tracking errors are mostly between −5 and −2 lbs, which are larger than those of the CMAC scheme. **Table 2** also shows that the maximum absolute tracking error and variance of tracking errors of the inverse model scheme are both larger than those of the CMAC scheme, so that performances of the CMAC scheme are superior to those of the inverse model scheme. Although the CMAC scheme and inverse model scheme both utilize inverse model idea, the difference is that the latter directly employs the unchanged inverse model of the identified transfer function and the modeling error always exists, but the inverse model approximated by the CMAC is dynamical and adaptive.

### 5.3. Results analysis

Compared with the traditional PID control method, the learning behavior and adaptive feature of the proposed CMAC control algorithm are embodied in the freedom of tuning control parameters and the robustness to the disturbances in the real world.

The PID control method has been widely used because of its simpleness, but the tuning problem of PID parameters (proportional, integral and differential) is difficult. At present, PID parameter-tuning optimization depends on the experiences of technical staffs and needs a lot of manpower and time, which means that the optimal PID parameters are difficult to be obtained by people’s tuning, and the inappropriate parameters cannot guarantee the control performances to meet the control requirements. In addition, the PID control law is a kind of the linear control law which owns few robustness to the disturbances. It means that even though the PID parameters are tuned optimally and perfectly in the simulations, the tuned parameters may perform poor in the real world due to disturbances and uncertainties.

Thus, combining the adaptive CMAC and the traditional PID to construct an intelligent neural network PID controller, can automatically identify the controlled plant and adaptively adapt the control parameters of the CMAC, which can solve the difficult problem of tuning parameters of the traditional PID controller. As shown in Sections 4 and 5, the PID parameters of the proposed CMAC algorithm in the experiments are same as those in the simulations, which verifies control performances of the proposed CMAC algorithm are independent of tuning PID parameters. Experimental results in the real world in Section 5 also demonstrate the robustness of the proposed algorithm owing to the CMAC neural network, while the traditional PID controller does not have this capacity.

## 6. Conclusions

In this chapter, a three-step systematic design approach is proposed to design an adaptive control system for practical use. We firstly study the system model identification problem of the embedded control material-strength testing system, including mathematical modeling of all the open-loop physical components and parameters identification of the mathematical model. Both theoretical analyses and experimental comparisons validate the identified transfer function of the system model is applicable for controller design and simulation. Next, benefited from limited computation cost and compensation ability to the modeling error, a simple and effective CMAC plus PD controller is simulated based on the identified system model, and then applied to the embedded control system for real-time force tracking. Both numerical simulations and actual experiments illustrate the proposed algorithm satisfactorily performs the tracking control task under real-time constraints of the embedded system.

On the other hand, different strength features of different types of the material plates will affect the control performances. Since the yield strength generated by the solar panel glass has an almost linear relationship with the deformation of the glass sheet, *K _{F}* in Eq. (7) is a constant. If the tested material plate is not a solar panel glass and the yield strength generated does not have a linear relationship with the deformation of the material plate,

*K*in Eq. (7) will not be a constant. In this case, the problems how to identify the parameters of the system model accurately for simulation-based controller design and how to adjust the CMAC plus PD controller to compensate the varying

_{F}*K*, will be under consideration in our future work.

_{F}