| Although China is a agricultural country,there is still a big gap between China and developed countries in the development of both the plant protection machinery and precisely application spraying technology.At present,not only the degree of automation of plant protection machinery is low,but also the machinery is short of real-time monitoring to spraying parameters.Because the pressure flow of liquid medicine in the drug supply system is unstable,the effect of spraying of liquid medicine is affected seriously,and this will result in the waste of resources and pollution of environment.Therefore,in order to improve the above situation,in this thesis a plant protection machine liquid flow monitoring system is designed and implemented based on embedded system.After plant protection machine and its use situation in practice are analyzed,functional requirements are proposed for flow monitoring system of the plant protection machine.According to the demand analysis,then the overall framework of the system is designed.Cortex-A8 processor is used as the embedded processor.Due to the nonlinearity and uncertainty of the system,fuzzy PID is selected as the intelligent control strategy.Embedded Linux and Qt are used as software development platform.After that the software and hardware of the liquid flow monitoring system are designed in detail.The platform of OK335xS-II is selected as development board for hardware,the peripheral circuit,the LCD circuit,and CAN bus module circuit are designed.The programming is based on the Linux operating system and the QT development platform is adopted.The C++ programming language is used to development of the human-machine interface for the system of flow control of plant protection machine.The functions,including displaying of the status parameters,changing and resetting parameters online via touch screen with virtual keys,alerting for system exception,debugging online controller,communicating by CAN bus,are all implemented.In order to meet the requirements of design,a Fuzzy-PID controller of liquid medicine is both designed and programmed.In order to verify the performance of the system,let the STM32 simulate the flow control model and CAN bus is used to build the communication,and these can form the hardware loop.The plant protection machine working process is simulated under laboratoryconditions,and the functions of the system are tested.The plant protection machine flow monitoring system work normally and it can meet the design requirements.It presents that the controller has a over shoot of 3% and the adjustment time is 3.2s under the excitation of a step response.When disturbance is added,the system can restrain the disturbance better,and this means the controller of liquid flow has better robustness.The plant protection machine flow monitoring system can meet the requirements of agricultural production. |