14th IFAC Conference on Programmable Devices and Embedded 14th Systems 14th IFAC IFAC Conference Conference on on Programmable Programmable Devices Devices and and Embedded Embedded 14th IFAC Conference on Programmable Devices and Embedded Systems October 5-7, 2016. Brno, Czech Republic Available online at www.sciencedirect.com Systems Systems October 5-7, 2016. Brno, Czech Republic October October 5-7, 5-7, 2016. 2016. Brno, Brno, Czech Czech Republic Republic
ScienceDirect
IFAC-PapersOnLine 49-25 (2016) 127–132
Real-time State Estimation for an Adaptive Real-time State Estimation for an Adaptive Real-time State Estimation for an Adaptive Vibration Energy Harvesting System Vibration Energy Harvesting System Vibration Energy Harvesting System
Mohammad Abdollahpouri ∗∗ Martin Gulan ∗∗ Gergely Tak´ acs ∗∗ ∗ Martin ∗ Gergely Tak´ Mohammad Abdollahpouri Gulan a cs ∗∗ ∗ ∗ ∗ ’ Mohammad Abdollahpouri Martin Gulan Gergely Tak´ a Boris Rohal -Ilkiv Mohammad Abdollahpouri Martin Gulan Gergely Tak´ acs cs ∗ ’’-Ilkiv ∗ Boris Rohal ∗ Boris Rohal -Ilkiv Boris Rohal’-Ilkiv ∗ ∗ Slovak University of Technology in Bratislava, Faculty of Mechanical ∗ University of Technology in Bratislava, Faculty of Mechanical ∗ Slovak Slovak University of in Faculty of Engineering, Institute of Automation, Measurement Applied Slovak University of Technology Technology in Bratislava, Bratislava, Facultyand of Mechanical Mechanical Engineering, Institute of Automation, Measurement and Engineering, Institute of of
[email protected]) Automation, Measurement Measurement and and Applied Applied Informatics,(e-mail: Engineering, Institute Automation, Applied Informatics,(e-mail:
[email protected]) Informatics,(e-mail: Informatics,(e-mail:
[email protected])
[email protected]) AbstractMoving horizon estimation (MHE) has proven to be an efficient optimization-based AbstractMoving horizon has proven to be an efficient optimization-based AbstractMoving horizon estimation (MHE) has proven to efficient technique to address the estimation problem of (MHE) joint state and parameter estimation with nonlinearities AbstractMoving horizon estimation (MHE) has and proven to be be an an efficient optimization-based optimization-based technique to address the problem of joint state parameter estimation with nonlinearities technique to address the problem of joint state and parameter estimation with nonlinearities in system dynamics and constraints. This work aims to propose the application of MHE for technique to address the problem of joint state and parameter estimation with nonlinearities in system dynamics and constraints. This work aims to propose the application of MHE for system dynamics and constraints. This work aims to propose the application of for ain specific nonlinear vibration setup, often used to analyze energy harvesting concepts in the in system nonlinear dynamics vibration and constraints. This used work to aims to propose the application of MHE MHE for a specific setup, often analyze energy harvesting concepts in the specific nonlinear nonlinear vibration setup, often used used to analyze analyze energy harvesting concepts in the the laboratory environment. Usingsetup, a simulated energy harvesting scenario exhibiting a strongly aalaboratory specific vibration often to energy harvesting concepts in environment. Using a simulated harvesting scenario exhibiting aa strongly laboratory environment. Using a energy harvesting scenario exhibiting nonlinear behavior, we focus on the estimationenergy of unmeasured states and a time-varying laboratory environment. Using a simulated simulated energy harvestingsystem scenario exhibiting a strongly strongly nonlinear behavior, we focus on the estimation of unmeasured system states and aa in time-varying nonlinear behavior, we focus on the estimation of unmeasured system states and time-varying structural parameter that can be utilized to maximize the harvested energy, or structural nonlinear behavior, we focus on the estimation of unmeasured system states and a time-varying structural parameter can be utilized to maximize the harvested energy, or optimization, in structural structural parameter that can be utilized to the energy, in health monitoring. Tothat exploit the recent algorithmic developments in embedded structural parameter that can the be recent utilizedalgorithmic to maximize maximize the harvested harvested energy, or or optimization, in structural structural health monitoring. To exploit developments in embedded health monitoring. To exploit exploit the recent recent algorithmic developments inplatform embedded optimization, we implement the proposed scheme on a low-cost embedded computing using automatic health monitoring. To the algorithmic developments in embedded optimization, we implement the proposed scheme on a low-cost embedded computing platform using automatic we implement the proposed scheme computing platform using automatic code generation. hardware-in-the-loop setup isembedded used in order to investigate performance we implement theA proposed scheme on on aa low-cost low-cost embedded computing platformthe using automatic code generation. A hardware-in-the-loop setup is used in order to investigate the performance code generation. A hardware-in-the-loop setup is used in order to investigate the performance of the real-time MHE scheme, and to quantify the associated computational effort. The results code generation. A hardware-in-the-loop setup is used in order to investigate the performance of the real-time MHE scheme, and to quantify the associated computational effort. The results of the real-time MHE scheme, and to quantify the associated computational effort. The results demonstrated in this paper, suggest the real-time feasibility of MHE, and certain practical of the real-timeinMHE scheme, and to quantify the associated computational effort. The results demonstrated this paper, suggest the real-time feasibility of MHE, and certain practical demonstrated inathis this paper,Kalman suggestfiltering the real-time real-time feasibility of MHE, MHE, and system. certain practical practical advantages overin standard in a vibration energy harvesting demonstrated paper, suggest the feasibility of and certain advantages over a standard Kalman filtering in a vibration energy harvesting system. advantages over a Kalman in aa vibration energy harvesting system. advantages a standard standard Kalmanoffiltering filtering in Control) vibration energy harvesting system. © 2016, IFACover (International Federation Automatic Hosting by Elsevier Ltd. All rights reserved. Keywords: Moving horizon estimation, embedded optimization, vibration energy harvesting, Keywords: Movingcantilever horizon estimation, estimation, embedded optimization, optimization, vibration energy energy harvesting, Keywords: Moving horizon embedded Duffing oscillator, beam. Keywords: Movingcantilever horizon estimation, embedded optimization, vibration vibration energy harvesting, harvesting, Duffing oscillator, oscillator, beam. Duffing cantilever beam. Duffing oscillator, cantilever beam. 1. INTRODUCTION they suffer from faults and structural damage. Methods 1. INTRODUCTION INTRODUCTION they suffer suffer from faults and and structural damage. Methods 1. they faults damage. Methods allowing for from the investigation of potential faults have also 1. INTRODUCTION they suffer faults and structural structural damage. Methods allowing for from the investigation investigation of potential potential faultsstructures, have also allowing for the of faults have also been extensively studied for flexible mechanical allowing for the investigation of potential faults have also been extensively studied for flexible mechanical structures, Alternative sources of energy are intended to be substi- been extensively for flexible in particular forstudied cantilever beams mechanical (Pawar andstructures, Ganguli, been extensively studied for flexible mechanical structures, Alternative sources of energy are intended to be substiin particular particular forthese cantilever beams (Pawar and Ganguli, Ganguli, Alternative sources are substitutes for conventional fossil fuels. Among to thebe cantilever beams and 2007). Most offor methods have (Pawar shown excellent fault Alternative sources of of energy energy are intended intended to becommon substi- in in particular forthese cantilever beams (Pawar and Ganguli, tutes for for conventional conventional fossil fuels. Among the common 2007). Most of methods have shown excellent fault tutes fossil fuels. Among the common renewable resources, we may mention wind, geothermal, 2007). Most of these methods have shown excellent fault detection properties, however, are not practically applicatutes for conventional fossil fuels. Among the common 2007). Most of these methods have shown excellent fault renewable resources, we may mention mention wind, geothermal, geothermal, detection properties, however, are not practically applicarenewable resources, we may wind, solar energy, energy generated by hydropower or even detection properties, however, are not practically applicable for a real-time implementation due to their enormous renewable resources, we may mention wind, geothermal, detection properties, however, are not practically applicasolar the energy, energy exhibited generatedbyby by hydropower hydropower or even even ble for a real-time implementation due to their enormous solar energy, energy generated or from vibrations structures. for implementation computational requirements. solar energy, energy exhibited generatedbybymechanical hydropower or even ble ble for aa real-time real-time implementation due due to to their their enormous enormous from the the vibrations mechanical structures. computational requirements. from vibrations exhibited by mechanical structures. Vibration-based energy harvesters have received increased computational requirements. from the vibrations exhibited by mechanical structures. computational requirements. Vibration-based energy harvesters have received increased The moving horizon estimation (MHE) method is using Vibration-based energy have received increased attention as a potential power source microelectronVibration-based energy harvesters harvesters have for received increased The The same moving horizon estimation estimation (MHE) methodasis is model using attention as a potential power source for microelectronmoving horizon (MHE) method using the theoretical foundation in its design moving horizon estimation (MHE) methodasis model using attention as aa potential power for microelectronics, showing promising results insource the context of powering The attention as potential power source for microelectronthe same theoretical foundation in its design ics, showing showing promising results indevices the context context of powering same theoretical foundation in its design as model predictive control (MPC). A fixed window of measurement the same theoretical foundation in its design as model ics, promising the wireless networks and results mobile in with of lowpowering energy the ics, showing promising results in the context of powering predictive control (MPC).behind A window of wireless networks networks andetmobile mobile devices withharvesting low energy energy control (MPC). A fixed fixedthe window of measurement measurement data is moving forward current time at each predictive control (MPC).behind A fixed window of measurement wireless and devices with low consumption (Sodano al., 2004). Energy of predictive wireless networks andetmobile devices withharvesting low energy data is is moving moving forward the current time at atleasteach consumption (Sodano al., 2004). Energy of data forward behind the current time each sampling period, forming a weighted constrained data is moving forward behind the current time atleasteach consumption (Sodano et al., 2004). Energy harvesting of ambient vibrations is important for remote devices; for consumption (Sodano et al., 2004). Energy harvesting of sampling period, forming a weighted constrained ambient in vibrations is health important for remote remote devices; for sampling period, forming aa weighted leastsquares optimization problem, which is constrained repeatedly solved sampling period, forming weighted constrained leastambient vibrations important for for example structuralis monitoring, wheredevices; the generambient vibrations is important for remote devices; for squares optimization problem, which is repeatedly repeatedly solved example in structural structural health monitoring, where the the gener- squares optimization problem, which is solved to estimate unknown model states. Because of the moving squares optimization problem, which is repeatedly solved example in health monitoring, where generated energy can be used directly or to recharge batteries. example in structural health monitoring, where the gener- to to estimate estimate unknown model states. Because of the the moving moving ated energy can be used directly or to recharge batteries. unknown model states. Because of window of measurements, the MHE algorithm can be to estimate unknown model states. Because of the moving ated energy can be used directly or to recharge batteries. The typical benchmarks used to study, demonstrate and ated energy can be used directly or to recharge batteries. window of ofto measurements, measurements, the MHE MHE algorithm can be The typical benchmarks used to study, demonstrate and window the algorithm can be expected behave more robustly than estimators based window ofto measurements, the MHE algorithm can be The typical used to study, demonstrate and analyze the benchmarks concepts of acquiring energy from mechaniThe typical benchmarks used to study, demonstrate and expected behave more robustly than estimators based analyze the concepts concepts of acquiring acquiring energy from mechanimechanito behave more robustly than estimators based on a single measurement data (Haseltine and Rawlings, expected to behave more robustly than estimators based analyze the of from cal vibrations are cantilever beam energy type vibration energy expected analyze the concepts of acquiring energy from mechanion aa single single measurement data (Haseltine and Rawlings, Rawlings, cal vibrations vibrations are cantilever cantilever beam type vibration vibration energy on measurement (Haseltine and 2005). Moreover, state anddata parameter constraints can be on a single measurement (Haseltine and Rawlings, cal are type energy harvesting devices (Friswell etbeam al., 2015). These structures cal vibrations are cantilever beam type vibration energy 2005). 2005). Moreover, state and anddata parameter constraints canthat be harvesting devices (Friswell et al., 2015). These structures Moreover, state parameter constraints can be included in the formulation itself. It has been shown 2005). Moreover, state and parameter constraints canthat be harvesting devices (Friswell et al., 2015). These structures are equipped with piezoceramic transducers that enable to harvesting devices (Friswell et al., 2015). These structures included in the formulation itself. It has been shown are equipped equipped with piezoceramic piezoceramic transducers that enable enable to to included in the formulation It has been shown that the receding horizon strategyitself. also plays a significant role in included in the formulation itself. It has been shown that are with transducers that convert mechanical energy into electricity. are equipped with piezoceramic transducers that enable to the the receding receding horizon strategy strategy alsoestimation plays aa significant significant role in convert mechanical energy into electricity. horizon also plays role in improving convergence rate and precision. This the receding horizon strategy alsoestimation plays a significant role in convert mechanical energy into electricity. convert mechanical electricity. improving convergence rate and precision. This The main challengeenergy in any into energy harvesting application improving convergence and precision. This can be observed e.g. inrate experimental results of Pol´oni et improving convergence rate and estimation estimation precision. This The main challenge in any energy harvesting application can be observed e.g. in experimental results of Pol´ o ni et The challenge in harvesting application is to main maximize the expected output power. Assuming a can be e.g. in results Pol´ ooni et al., comparing MHE pre-filtering and the of widely used The challenge in any any energy energy harvesting application can be observed observed e.g.with in experimental experimental results Pol´ ni et is to to main maximize the expected output power. Assuming Assuming al., comparing comparing MHE with pre-filtering and the of widely used is maximize expected output power. aaa al., vibration energythe harvesting system operating in a linear MHE with pre-filtering and the widely used extended Kalman filter (EKF) for parameter estimation, is to maximize the expected output power. Assuming al., comparing MHE with pre-filtering and the widely used vibrationthis energy harvesting system operating in aa linear linear extended Kalman (EKF) parameter estimation, vibration energy harvesting operating in fashion, occurs when the system fundamental frequency of the extended Kalman filter (EKF) for parameterresponse estimation, where MHE showedfilter much faster for convergence and vibration energy harvesting operating in a linear Kalman filter (EKF) for parameter estimation, fashion,isthis this occurs when the system fundamental frequency of the the extended where MHE showed much faster convergence response and fashion, occurs when the fundamental frequency of system close to the dominant frequency of the ambient where MHE showed much faster convergence response better estimation performance than EKF (Pol´ oni et and al., fashion, this occurs when the fundamental frequency of the where MHE showed much faster convergence response and system is is close close to the the dominant frequency frequency of the ambient better estimation performance than EKF (Pol´ o ni et al., system to dominant of the ambient vibration, ensuring a resonance response that maximizes better estimation performance than EKF (Pol´ o ni et al., 2013; Tak´ a cs et al., 2014). system is close to the dominant frequency of the ambient better estimation performance than EKF (Pol´ o ni et al., vibration, ensuring a resonance response that maximizes 2013; Tak´ a cs et al., 2014). vibration, aa resonance response that the strain ensuring in the piezoelectric et al., 2013; Tak´ aacs et al., 2014). vibration, ensuring resonance material response (Friswell that maximizes maximizes 2013; Tak´ cs et al., 2014). the strain in the piezoelectric material (Friswell et al., In this paper we propose to employ MHE in a hardwarethe strain in piezoelectric material (Friswell et al., 2015). Another challenging problem regarding energy the strain in the the piezoelectric material (Friswell et haral., In In this this paper paper we we propose propose to employ employ MHE MHE harvesting in aa hardwarehardware2015). Another challenging problem regarding energy harto in in-the-loop for a vibration sysIn this papersetup we propose to employenergy MHE harvesting in a hardware2015). Another challenging problem regarding energy harvesting is that, similarly to any real mechanical structure, 2015). Another challenging problem regarding energy harin-the-loop setup for a vibration energy sysvesting is that, similarly to any real mechanical structure, in-the-loop setup for a vibration energy harvesting sysvesting vesting is is that, that, similarly similarly to to any any real real mechanical mechanical structure, structure, in-the-loop setup for a vibration energy harvesting sysCopyright © 2016, 2016 IFAC 127 Hosting by Elsevier Ltd. All rights reserved. 2405-8963 © IFAC (International Federation of Automatic Control) Copyright © 2016 IFAC 127 Copyright © 2016 IFAC 127 Peer review under responsibility of International Federation of Automatic Copyright © 2016 IFAC 127Control. 10.1016/j.ifacol.2016.12.022
2016 IFAC PDES 128 Mohammad Abdollahpouri et al. / IFAC-PapersOnLine 49-25 (2016) 127–132 October 5-7, 2016. Brno, Czech Republic
tem. The main objective is to estimate the unmeasured states and the unknown time-varying tip mass of a vertical elastic beam with ambient excitation; acting as an energy harvester. A brief motivation study is shown, relating the excitation amplitude and the tip mass to the amount of obtained energy; suggesting the potential of real-time state and parameter estimation in providing a basis for maximizing the harvested energy. Due to the necessity of large deflections, we make use of a nonlinear model description of the system. The nonlinear system dynamics is simulated in real time by means of an auxiliary hardware, providing a set of input data to the estimator. The real-time MHE algorithm itself is efficiently implemented and executed on a low-cost computing platform. This study is performed to inspect the estimation performance and the computational complexity of embedded MHE in a time-varying vibration energy harvesting application.
Mt
q
u(t) = u0 sin t Figure 1. Schematics of the inverted beam with tip mass.
2. VIBRATION ENERGY HARVESTING SYSTEM
2.2 Model description
One of the possible approaches to maximize the harvested energy over different ranges of excitation, while considering a nonlinear system, is to make use of a so-called double potential well function, so that the device itself will have two equilibrium positions (Ferrari et al., 2010). The Duffing oscillator is a well known example for a double potential well and has been extensively studied, especially for sinusoidal excitation (Kovacic and Brennan, 2011). Its dynamics is exhibiting chaotic behavior and can make the estimation task even more challenging. Thanks to its properties, the Duffing oscillator model is often used in energy harvesting simulations, with the addition of electro-mechanical coupling for the harvesting circuit. The implementation of such a system was first studied as a mechanical structure with chaotic attractor motions (Moon and Holmes, 1979). In reality, the excitation frequency can be low and the energy harvester should be efficient enough in such a situation; for example the energy harvesting from the vibration of long-span bridges and towers. A lowfrequency piezoelastic harvester is quite sensitive to the weight of the attached tip mass. In this study, we choose a specific profile for the values of the mass weight in a way that the system shows different kinds of chaotic behavior aiming to maximize the harvested energy. 2.1 Inverted beam harvester The nonlinear energy harvesting system assumed in this work, as proposed by Friswell et al. (2015), consists of two main parts, see Fig. 1. A vertical elastic beam carries a concentrated tip mass Mt with the moment of inertia It , at the position Lt from the bottom of the beam (note that the subscript t represents the tip mass), and a base that is harmonically excited with frequency ω and the amplitude u0 , perpendicular to the beam axis, i.e. with horizontal movement denoted as u(t) = u0 sin ωt. It should be noted that the ratio αI = It /Mt is assumed to be constant (Friswell et al., 2012). The length of the beam is denoted as L and the tip mass is located at the end of the beam as shown in Fig. 1. A piezoelectric patch is attached to the bottom of the beam with the length of Lc . Conventionally, the displacement of free end of the beam q is assumed to be measured, however, in this work we only measure the voltage obtained by means of the piezoelectric patch. 128
The nonlinear equation of motion considering the piezoelectric patch coupling effect was originally derived by Friswell et al. (2015), and it was recently corrected by ¨ Unker and Cuvalci (2015), as follows: 2 [C5 It + Mt + ρAC1 + (ρAC3 + Mt C42 + C52 It )q 2 + q + [ρAC3 + Mt C42 + C54 It + 1/2It N 56 q 2 ]q q˙2 1/4It C56 q 4 ]¨ + [EIC6 − C9 ρAg − C4 Mt g + 2EIC7 q 2 + 3/4EIC8 q 4 ]q ¨ (1a) − θ1 V − θ2 q 2 V = −[ρAC2 + Mt ]u, 2 ˙ (1b) Cp V + V /Rl + θ1 q˙ + θ2 q q˙ = 0, where V is voltage across the piezoelectric layer, A is the cross-sectional area, E denotes the Young’s modulus, I is the second moment of inertia and ρ denotes the mass density of the beam. Rl is the load resistor, Cp is the capacitance of the piezoelectric patch, and θi denote the electro-mechanical coupling and are functions of Lc . The constant parameters Ci appearing in (1) can be determined as follows: ) ( ) ( 4 ( 2) 3π − 8 L, ( 22π ) π 1 , C4 = ( 86 ) Lt π 1 , C7 = 29 L5 C1 =
π−2 L, π ( ) π 1 C5 = , (2 8 L)t 1 π C8 = 4096 , L7 C2 =
2π − 9π 1 , 384 L ( 4) π 1 C6 = , ( 32 L3 ) 1 1 2 C9 = − + π . 4 16 C3 =
In summary, (1a) describes the nonlinear dynamics of the vertical elastic beam, which is coupled by means of the −θ1 V − θq 2 V term with (1b), relating it to the electric circuit of the piezoelectric patch. In order to understand the mathematical meaning of potential wells outlined in the introductory section, the equilibrium positions can be calculated as shown by Friswell et al. (2012). Rewriting (1a) in steady state, with the electrical coupling term omitted, yields the well-known Duffing equation given as 3 [EIC6 − C9 ρAg − C4 Mt g + 2EIC7 q 2 + EIC8 q 4 ]q = 0, 4 which has either one or three real solutions corresponding to the origin and two potential wells (bucking points). In this paper, we are interested in the latter case, which can be proven to provide more power output in an energy
2016 IFAC PDES October 5-7, 2016. Brno, Czech Republic Mohammad Abdollahpouri et al. / IFAC-PapersOnLine 49-25 (2016) 127–132
harvesting application (Friswell et al., 2015). This can be ensured if the following condition over the tip mass holds: Mt > (EIC6 − C9 ρAg)/(C4 g). Beyond its physical meaning the value of tip mass can also be understood as a dynamic quantity, compensating for model uncertainties. Its estimation can be useful in creating an adaptive tip mass energy harvesting system.
The equations in (1) can be transformed into a nonlinear state-space model given by x˙ = F (x, u) and y = H(x, u)+ T n, where x = [q q˙ V ] ∈ R3 denotes the state vector, function F ∈ R3 denotes the continuous-time nonlinear system dynamics, H ∈ R is the measurement function and n ∈ R denotes the measurement noise with variance R.
In order to estimate the unknown parameter—tip mass of the beam—let us assume that its value remains constant over one sampling period, however, it may be changing throughout the estimation procedure. Therefore, denoting the parameter to be estimated as Mt , it can be added to the state vector as x4 = Mt , hence, the augmented state vector is x ∈ R4 , and the augmented nonlinear state-space representation, while considering the condition over the tip mass as It = αI Mt , can be expressed as follows: x˙1 = x2 , (2a) ( 2 (2b) x˙2 = − 1/[C5 αI x4 + x4 + ρAC1 ) + (ρAC3 + x4 C42 + C54 αI x4 )x21 + 1/4αI x4 C56 x41 ] ( [ρAC3 + x4 C42 + C54 αI x4 + 1/2αI x4 C56 x21 ]x1 x22 + [EIC6 − C9 ρAg − C4 x4 g + 2EIC7 x21 + 3/4EIC8 x41 ]x1 ) − θ1 x3 − θx21 x3 + [ρAC2 + x4 ]¨ u , x˙3 = (−1/Cp )(x3 /Rl + θ1 x2 + θ2 x21 x2 ), x˙4 = 0, y = x3 + n.
solving the following constrained nonlinear least-squares optimization problem: t ∑ 2 ¯ t−N +1 ∥2S + ∥yt − h(xt , ut )∥WY min ∥xt−N +1 − x xt ,ut
s.t.
i=t−N +1
xt+1 = f (xt , ut ), xl ≤ xt ≤ xu ,
2.3 Augmented state-space representation
(2c) (2d) (2e)
MHE assumes (2) in a discrete-time form, which can be expressed as x(t + 1) = f (x(t), u(t)) and y(t) = h(x(t), u(t)) + n(t), where t = 0, 1, 2, . . . , is the discretetime instant, y(t) is the measurement at time instant t, u(t) is the descritized input signal, and h and f are the discrete forms of H and F , respectively. 3. MOVING HORIZON ESTIMATION In theory, a full information estimator uses all measurement data from initial time t0 until the current time instant. The problem dimensionality will, however, make the computations quickly intractable. To circumvent this problem, the least-square optimization-based MHE uses a window of information with fixed length (Rawlings, 2014). In this approach, the measurement data is available at the beginning of each sampling instant, and the input signal is supposed to be constant over each sampling period Ts . The estimation horizon given by the finite time window is denoted as N > 0. The optimal state and ˆ and u input estimates, x ˆ, can be obtained by repeatedly 129
129
t = 0, 1, . . . , N − 1,
t = 0, 1, . . . , N.
(3a) (3b) (3c)
¯ , from In Eq. (3), the deviation of the a priori estimate, x the oldest estimate is penalized by a positive definite matrix S ∈ R4 , and the difference between measured output and estimated one in (3a) is penalized with WY . Physical limitations in most dynamic systems are generally inevitable, therefore, in the optimization problem above we assume lower and upper bounds imposed on the states (xl , xu ). These constraints may be used to ensure positiveness of estimated parameters (such as the tip mass), enforce limits on dynamic states (such as restricted displacement), or may be used merely due to the bounds imposed on certain physical states (limitation on electrical components). Furthermore, the nonlinear dynamics of the system is regarded as an equality constraint. The objective function in (3a) consists of two main parts: arrival cost as the first term and a stage cost as the second term. Arrival cost carries the information regarding the measurement data which could not be stored in the moving window of measurements. The role of the arrival cost term, besides ensuring stability, is to approximate a full information estimator. There are several methods ¯ and the tuning parameter S for available for calculating x the arrival cost term, for example see the works by Rao et al. (2003) and K¨ uhl et al. (2011). 4. HARDWARE & SOFTWARE IMPLEMENTATION A hardware-in-the-loop simulation is typically employed when the real system is not available or may serve as a preliminary real-time simulation environment with the aim to provide reliable results and timing certificates for potential experiments with the real-world application. The HIL setup replicates the real conditions more accurately than pure simulation by providing an interface to interact with real hardware, i.e. dealing with the inherent issues of limited computational power, allocated memory, finite numeric precision, defective sensor and actuator saturation, etc. Overall, HIL is an efficient way to verify a methodology for a real, but unavailable system. In order to implement the HIL simulation setup, the configuration depicted in Fig. 2 was considered and realized. The continuous nonlinear system dynamics (1) is being integrated on a host PC of the Simulink Real-Time rapid prototyping system. The simulation scheme is compiled and executed in real time on a target PC in order to generate a set of measurement data and provide them as analog signals using the data acquisition board. The MHE algorithm itself is implemented on a low-cost Raspberry Pi (RP), Model B microcontroller board, which employs a Broadcom BCM2835 ARMv6 system on a chip (SoC) architecture. This prototyping board has no analog I-O interface, hence a PCF8591 8-bit A/D chip with four
2016 IFAC PDES 130 Mohammad Abdollahpouri et al. / IFAC-PapersOnLine 49-25 (2016) 127–132 October 5-7, 2016. Brno, Czech Republic
Simulink Real-Time
TCP/IP
AI/AO target PC
5. RESULTS
DI/DO
To have a closer look at the nonlinear nature of the system dynamics and the challenge of finding an optimal tip mass for maximizing the harvested energy, a simulation study has been performed; see Fig. 3. Different values of excitation amplitudes ranging from 5 to 30 mm were considered, while the the tip mass was being increased by 3 g in 100-second intervals from 0 to 27 g; then the respective harvested power has been recorded. The red markers denotes the optimal choice of tip mass for a particular excitation amplitude. The external resistive load RL is considered to extract the output power Ph . Its value was calculated by integrating V 2 /RL over each interval, where the tip mass and the excitation signal amplitude were kept constant. Fig. 3 depicts the chaotic behavior of the system, where a small change in the excitation amplitude leads to a different value for the optimal choice of tip mass. It should also be noted, that for each fixed excitation amplitude u0 , the choice of the tip mass increment will affect the optimal tip mass leading to maximal harvested energy.
EMBEDDED COMPUTING
O
DI/D
PLATFORM
PCF8591
Raspberry Pi
Figure 2. Schematics of the HIL simulation setup. Table 1. Parameter values used in simulation. ρ = 7850 kg.m−3 E = 210 GN.m−2 L = 300 mm A=
4 mm2
Mt = 0 − 27 g
θ1 = −1.245 × 10−5 C.m−1 θ2 = −4.345 × 10−6 C.m−3 Rl = 100 kΩ
Cp = 51.4 nF αI = 40.87 mm2
analog inputs and one analog output is utilized to provide this functionality. The data is being transferred to and from the RP via a bidirectional I2 C-bus. Furthermore, in order to synchronize the real-time simulation environment with the embedded computing platform (RP), a digital signal generated by the target PC is used to trigger the execution of the estimation routine on the RP. The MHE algorithm was generated in C language using the ACADO code generation tool (Houska et al., 2011). This framework employs the so-called real-time iteration (RTI) scheme proposed by Diehl et al. (2002), originally developed for nonlinear MPC and later adopted for nonlinear MHE as well (K¨ uhl et al., 2011). The RTI scheme exploits sequential quadratic programming, and calls qpOASES (Ferreau et al., 2014)—a quadratic programming (QP) strategy—to solve the underlying QPs. The scheme uses a multiple shooting discretization with the Gauss-Newton Hessian approximation. Although, based on the authors’ knowledge there are no previous academic works exploiting the aforementioned approach for nonlinear vibrations, a pseudo real-time implementation of an auto-generated MHE algorithm has been recently proposed by Tak´acs et al. (2014) for the estimation of states and parameters for a linear vibrating system. The real-time routine including the exported MHE code has been compiled to an executable using the GNU Compiler Collection for C and C++ v4.9.3. This was then executed on the Raspberry Pi running a Raspbian Linux in the kernel v3.18 as its base operating system. The values of parameters introduced in (1) were adopted from (Friswell et al., 2012) and are specified in Table 1. The tuning parameters for the MHE algorithm are chosen for the horizon length of N = 10 steps and sampling time of Ts = 10 ms as WY = 3e3,( while the arrival cost penaliza) tion is chosen as S = diag [1e0 1e0 1e0 1e−3] . The constraints are given by the bounds of the input signal, and 130
6
Ph [mW]
host PC
by a requirement that the deflection of the freely oscillating end of the beam can not be greater than its length, i.e. |q1 | ≤ 300 mm. Moreover, the estimates of the tip mass are required to be non-negative, i.e. Mt ≥ 0.
REAL-TIME SIMULATION
4 2
20 15
Mt [g] 10
5 0
5
10
15
20
25
30
u0 [mm]
Figure 3. The harvested energy for different u0 and Mt . Tip masses providing the maximum energy for a specific level of excitation are denoted by red color. 5.1 Estimation performance In this paper, the main objective is to examine the applicability of MHE for the nonlinear vibration energy harvester and to monitor its execution time performance on embedded hardware. This system exhibits chaotic behavior for specific ranges of parameters and excitation frequency; c.f. Fig. 3. Assuming a harmonic input with a frequency of 0.5 Hz, the nonlinear system is excited while the tip mass parameter is changing gradually after every 100 seconds of simulation time. The output voltage and the excitation signal are being measured, whereas the position, velocity, the harvested voltage and the changing tip mass are estimated. To account for the fact that voltage may
Velocity [m/s]
Velocity [m/s]
Velocity [m/s]
2016 IFAC PDES October 5-7, 2016. Brno, Czech Republic Mohammad Abdollahpouri et al. / IFAC-PapersOnLine 49-25 (2016) 127–132
The standard deviation (STD) of TET for both estimation methods were less than 0.1 ms.
0.2 0
131
EKF True MHE
6. CONCLUSION & FURTHER WORK
-0.2 -0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.4 0.2 0 -0.2 -0.4 -0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.4 0.2 0 -0.2 -0.4 -0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
Displacement [m]
Figure 4. Real and estimated state trajectory; top to bottom, Mt = {9, 15, 18} g, respectively. not be measured perfectly, a white Gaussian noise with the variance of 0.1 V has been assumed in the real-time simulation. Figure 5 illustrates the estimation procedure, with the tip mass value being abruptly changed after each 100 seconds from 0 to 27 g. This will suddenly change the dynamic behavior of the nonlinear system, where the effect of this structural change can be clearly observed in Fig. 4. This figure shows the state trajectory of the system, illustrating its chaotic behavior in a scenario when the tip mass has been changed by a relatively small amount. Both Fig. 5 and Fig. 4 illustrate the estimation performance of MHE with horizon length of 10 steps, in comparison with an equivalently tuned EKF (see e.g. Pol´ oni et al. (2013)). Not only does the estimation error show a better performance for MHE, it also demonstrates the negative effect of the same measurement noise for EKF. The bias or slower convergence of state estimation for the EKF case, can be observed in Fig. 6. Here, the advantage of MHE over EKF is evident. In particular, after the tip mass change to 15 g the beam starts to oscillate around the buckling points (see Fig. 4), and EKF performance degrades significantly. 5.2 Timing performance In order to exploit the available performance of the embedded estimation on the Raspberry Pi board with different problem settings, the de-facto standard EKF and MHE with horizon 10 have been implemented in real time; enabling to investigate the improvement in parameter estimation quality. It should be noted that apart from solving the optimization problem the total execution time (TET) also accounts for the time necessary for integrating the system dynamics, reading from peripherals and storing the data. In the utilized HIL setup, reading two analog signals from the peripherals took around 1.6 ms on average. The average value of TET for MHE was 4.48 ms, while it took 2.16 ms to perform EKF. The maximum execution time was 5.97 and 2.57 ms for MHE and EKF, respectively. 131
This paper has proposed MHE to estimate the unmeasured states and an unknown time-varying structural parameter—the tip mass—of a vertical elastic beam with ambient excitation in a vibration energy harvesting application. The system was simulated by a nonlinear state-space model within a real-time hardware-in-the-loop setup. The state and parameter estimates were obtained at each sample time by repeatedly solving a constrained nonlinear optimization problem exploiting the ACADO Code Generation Tool. The solver code itself was implemented and executed on a low-cost computing platform in real time, respecting the fast dynamics of the system. The presented simulation results have suggested a very good estimation performance of the MHE scheme compared to the EKF, providing reliable estimates of both the states and the time-varying parameter. Moreover, the timing analysis has shown that the computation time is tractable, even for an optimization based estimation method. The overall results clearly suggest the potential applicability of the scheme in terms of real-time deployment on embedded computing platforms. Future work will focus on implementing embedded MHE in a laboratory experiment, utilizing the estimation results to create an adaptive energy harvesting system with variable tip mass. 7. ACKNOWLEDGMENT The authors gratefully acknowledge the contribution of the People Programme (Marie Curie Actions) of the European Union’s Seventh Framework Programme (FP7/2007-2013) under REA grant agreement no 607957 (TEMPO); and the financial contribution of the STU Grant scheme for the Support of Excellent Teams of Young Researchers, the Slovak Research and Development Agency (APVV) under the contract APVV-14-0399; and by the support of the Scientific Grant Agency (VEGA) of the Ministry of Education, Science, Research and Sport of the Slovak Republic under the contract 1/0144/15. REFERENCES Diehl, M., Bock, H.G., Schl¨oder, J.P., Findeisen, R., Nagy, Z., and Allg¨ower, F. (2002). Real-time optimization and nonlinear model predictive control of processes governed by differential-algebraic equations. In Conference of Process Control, volume 12, 577–585. Elsevier. Ferrari, M., Ferrari, V., Guizzetti, M., And`o, B., Baglio, S., and Trigona, C. (2010). Improved energy harvesting from wideband vibrations by nonlinear piezoelectric converters. Sensors and Actuators A: Physical, 162(2), 425–431. Ferreau, H., Kirches, C., Potschka, A., Bock, H., and Diehl, M. (2014). qpOASES: A parametric active-set algorithm for quadratic programming. Mathematical Programming Computation, 6(4), 327–363. Friswell, M., Bilgen, O., Ali, S., Litak, G., and Adhikari, S. (2015). The effect of noise on the response of a vertical cantilever beam energy harvester. Journal of Applied Mathematics and Mechanics, 95(5), 433–443.
q [m]
0.2 0.1 400
600
800
400
600
800
1000
0.2 0 200
400
600
0 -0.1 390
0.05 0 200 0.4
0.1
1000
q˙ [m/s]
0 200 0.1
V [V]
|ˆ x3 − x3 | [V] |ˆ x1 − x1 | [m] x2 − x2 | [m/s] |ˆ
2016 IFAC PDES 132 Mohammad Abdollahpouri et al. / IFAC-PapersOnLine 49-25 (2016) 127–132 October 5-7, 2016. Brno, Czech Republic
800
395
400
405
410
395
400
405
410
400
405
410
0.2 0 -0.2 390 0.5 0 -0.5
1000
390
395
Time [s]
Time [s]
Figure 5. State estimation error (left) and detailed performance (right), blue – EKF, red – MHE, black – true value.
Tip mass [g]
40 30 20
x4 x ˆEKF 4 x ˆMHE 4
10 0 200
300
400
500
600
700
800
900
1000
Time [s] Figure 6. Tip mass estimates by MHE and EKF. Friswell, M.I., Ali, S.F., Bilgen, O., Adhikari, S., Lees, A.W., and Litak, G. (2012). Non-linear piezoelectric vibration energy harvesting from a vertical cantilever beam with tip mass. Journal of Intelligent Material Systems and Structures, 23(13), 1505–1521. Haseltine, E.L. and Rawlings, J.B. (2005). Critical evaluation of extended Kalman filtering and moving-horizon estimation. Industrial & engineering chemistry research, 44(8), 2451–2460. Houska, B., Ferreau, H.J., and Diehl, M. (2011). An autogenerated real-time iteration algorithm for nonlinear MPC in the microsecond range. Automatica, 47, 2279– 2285. Kovacic, I. and Brennan, M.J. (2011). The Duffing equation: nonlinear oscillators and their behaviour. John Wiley & Sons. K¨ uhl, P., Diehl, M., Kraus, T., Schl¨ oder, J.P., and Bock, H.G. (2011). A real-time algorithm for moving horizon state and parameter estimation. Computers & Chemical Engineering, 35, 71–83. Moon, F. and Holmes, P.J. (1979). A magnetoelastic strange attractor. Journal of Sound and Vibration, 65(2), 275–296. Pawar, P.M. and Ganguli, R. (2007). Genetic fuzzy system for online structural health monitoring of composite helicopter rotor blades. Mechanical Systems and Signal 132
Processing, 21, 2212–2236. Pol´oni, T., Eielsen, A.A., Rohal’-Ilkiv, B., and Johansen, T.A. (2013). Adaptive model estimation of vibration motion for a nanopositioner with moving horizon optimized extended Kalman filter. Journal of Dynamic Systems, Measurement, and Control, 135(4), 041019. Rao, C.V., Rawlings, J.B., and Mayne, D.Q. (2003). Constrained state estimation for nonlinear discrete-time systems: Stability and moving horizon approximations. Automatic Control, IEEE Transactions on, 48, 246–258. Rawlings, J.B. (2014). Moving Horizon Estimation. Springer London, 1–7. Sodano, H.A., Inman, D.J., and Park, G. (2004). A review of power harvesting from vibration using piezoelectric materials. Shock and Vibration Digest, 36(3), 197–206. Tak´acs, G., Pol´oni, T., and Rohal’-Ilkiv, B. (2014). Pseudo real-time state and parameter estimation of a vibrating active cantilever using the moving horizon observer. In Proceedings of the 21th International Congress on Sound and Vibration (ICSV 14), 820/1–820/8. Beijing, China. ¨ Unker, F. and Cuvalci, O. (2015). Comments on non-linear piezoelectric vibration energy harvesting from a vertical cantilever beam with tip mass. Procedia - Social and Behavioral Sciences, 195, 2391 – 2400. World Conference on Technology, Innovation and Entrepreneurship.