The implementation method of wireless multimedia sensor node apparatus
Technical field
The present invention relates to the solution of Video Applications in a kind of wireless communication field, belong to the crossing domain of embedded development and computer networking technology.
Background technology
Along with the develop rapidly of the communication technology, embedded computing technique and sensor technology and increasingly mature, the microsensor with perception, computing capability and communication capacity begins to occur, and has caused people's very big concern.Various environment or monitoring target information in the sensor network of Xing Chenging perception in phase thus, collection and the processing network's coverage area, and be distributed to the user who needs these information.Sensor network merges information world in logic with real physical world, profoundly changed the interactive mode of man and nature, can be widely used in numerous areas such as military affairs, industrial or agricultural control, biologic medical, environmental monitoring.
At present, an importance of sensor network research is how to realize simple environment data (as temperature, humidity, light intensity etc.) collection, transmission and processing on the serious limited miniature node of energy.Yet, increasingly sophisticated changeable along with monitoring of environmental, the simple data of being obtained by these traditional sensors networks can not satisfy the comprehensive demand of people to environmental monitoring further, press for multimedia messagess such as amount of information abundant image, audio frequency, video are incorporated into environmental monitoring activity based on sensor network, realize fine granularity, the precisely environmental monitoring of information.Thus, multimedia sensor network arises at the historic moment.
The sensor node that utilizes the MEMS art designs is specially designed miniature " computer system ".What generally use at present, is the series sensor nodes such as Mica, MicaZ of Univ California-Berkeley's exploitation.Yet this category node only has the ability of single-value datas such as sense temperature, humidity, the sound intensity, illumination, ultrasonic wave, vibration.Sensor assembly on the MicaZ series node also only has the sound intensity (db) acquisition capacity, the monitoring and the location that are used for target, do not support collection and processing to audio, video data, press for the researcher and design real multimedia sensor node, with the application of effective support multimedia sensor network.Yet, because outstanding features such as big, the circuit complexity of audio frequency and video node power consumption, make design and Implement low in energy consumption, volume is little, the audio frequency and video sensor node of good stability has challenge.
In recent years, the multimedia sensor network Study on Technology has caused scientific research personnel's close attention, some scholars have carried out the pilot study of multimedia sensor network aspect, many the domestic and international famous institutions of higher learning have also begun the research work of multimedia sensor network aspect simultaneously, have set up the video sensor network group one after another and have started corresponding scientific research plan.The research of multimedia sensor node prototype serves as main the development with the video sensor node mostly, and alternative in the market sensor assembly and processing communication module are very many.With complex video transducer comparatively is example, and expensive Pan-Tilt-Zoom camera, high-resolution digital camera are arranged, still cheap network cameras Web-cams, mobile phone camera Cell-phone-class, or even the cheaper micro-camera Cyclops of cost.In addition, the multimedia sensor node that satisfies the different application demand is built in advanced embedded processing communication technology support, from built-in PC s equipment to the Stargate that compares favourably with intelligent terminal PDA, the SOC solution from the Mote of low energy consumption to more low energy consumption.Can be in the practical application according to the difference of environmental monitoring demand, select arbitrarily and arrange in pairs or groups sensor assembly and processing communication module dissimilar and that performance is different constitute multiple multimedia sensor node.
The inventor finds that in research process in the existing wireless multimedia sensor node design, great majority need to be partial to the application of big power consumption, high video quality, and this needs node to have very strong disposal ability.And for some low-power consumption, only to have a video solution of light-type main frame of simple process ability fewer, it is limited and for the less demanding application of picture quality therefore to have limited in the real life some energy consumptions.
Summary of the invention
Technical problem: the objective of the invention is provides a kind of method for designing of wireless multimedia sensor node based on microsensor node UbiCell, makes the UbiCell node also have the function of video sensing.This node adopts the cmos imaging instrument with low energy consumption and medium image quality, has low-power consumption video capture and disposal ability, has therefore prolonged the useful life of node; Simultaneously, other video sensor nodes relatively, this design of node cost is lower, can be deployed in surveyed area in a large number and reach better coverage.
Technical scheme: the invention provides a kind of implementation method of wireless multimedia sensor node apparatus, this device comprises video sensor resume module/communication module, connects by the accurate interface of 51 pin marks between the two; Wherein, the video sensor module comprises processor module, video acquisition module, CPLD module, static random access memory module, flash memory module and peripheral interface module; The whole video sensor assembly is that core is coordinated each task with the processor module, utilize the CPLD module to provide high frequency clock to cooperate video acquisition module work, simultaneously processor module can be provided with the parameter of imager (being video acquisition module) by the I2C serial communication interface, and processor module and CPLD module are shared static random access memory module and flash memory module by data/address bus and address bus; The software systems of video sensor module intend adopting the nesC language to write, and run on the TinyOS operating system environment, mainly comprise the realization of following three kinds of assemblies: driver, built-in function collection and sensor application program.
The step that realizes is as follows:
The major function of the clear and definite node of step 1): the major function of multimedia sensor node is to gather multimedia letters such as audio frequency, video, image, and can simply handle, comprise compression, identification, fusion etc., and can transmit the data that other nodes are sent, require node to have high system reliability and high integration simultaneously, real-time analysis preferably and disposal ability, the transfer of data accuracy;
Step 2) the basic architecture design of node: mainly form on the node hardware by two parts, the one, sensor assembly, another is to handle communication module, connect by expansion interface between the two, be hardware platform layer, embedded system kernel and application layer bottom-up being divided on the software;
Step 3) node hardware module is divided: extending video sensor assembly on the UbiCell node, UbiCell is the product of having realized, the video sensor module comprises processor module, video acquisition module, CPLD module, static random access memory module, flash memory module and peripheral interface module;
The design of step 4) processor module: the processor module on the video sensor panel mainly connects video acquisition module, CPLD module, external memory modules; Processor module is as the control core of video sensor module, and it can be provided with the parameter of imager, and the calculating that the indication imager is caught frame of video and moved this is ground carried out simple process to the image of seizure; Processor uses three holding wires promptly: reading and writing, enable, expand external memory storage as read-write and address latch signal, utilize CPLD from imager capturing video frame and be kept at the internal memory, and the parameter of imager is set by the I2C interface, by bus mode outer memory module is read and write, processor can carry out any specific image processing operation by reference to storage, and this bus is by CPLD and processors sharing;
The design of step 5) video acquisition module: imager is a video sensor module most important component, main connection processing device of this module and CPLD module, the parameter of imager is set by processor, catching of image needs high-frequency clock, and this clock can be provided by CPLD;
Step 6) CPLD modular design: this module mainly is to cooperate processor to carry out video capture, and video captured is left in the middle of the memory.In addition, CPLD can provide the specific specialists logic to realize quick hardware operation;
The design of step 7) external memory storage: external memory storage comprises static random access memory module and flash memory module.Multimedia sensor node can utilize the static random access memory that extends out, with the processor internal memory of accelerating limited, for the storage of the image of processor with handle necessary space is provided; This exterior node has external flash, can hold large-scale nonvolatil data, needs the sensing of permanent storage potentiality, processor and CPLD to communicate by rambus and shares static random access memory and flash memory thereby enlarged;
The design of step 8) software system architecture: the software systems of video sensor module intend adopting the nesC language to write, and run on the TinyOS operating system environment, mainly comprise the realization of following three kinds of assemblies: driver, built-in function collection and sensor application program;
The design of step 9) driver component: driver component makes processor to communicate with different peripheral hardwares, makes each hardware module to work normally simultaneously.The video sensor module mainly comprises following several driver: imaging setting and catch driver is used for identification and control of video acquisition module; The CPLD driver drives CPLD and finishes the collection and the storing process of video; The flash drive program, identification flash memory, the permanent mass data storage ability of expansion node; And make the driver that the video sensor module can communicate with main frame UbiCell;
Step 10) built-in function collection component design.Library file has encapsulated the treatment of picture logic, comprises multiple different set, wherein it is important various matrix operations, statistics and histogram library file; These library files are the keys of raw video being carried out any processing, and other library file can be used for finishing specific high-level task object detection or motion vector identification library file near using;
The design of step 11) sensor application program assembly: the sensor application program is the main sensory package of video sensor module; It receives suitable instruction from main frame, and the necessary sensing operation of responsible main frame requirement; In fact the Application in Sensing program makes node become intelligence sensor, makes node independently, accurately to gather with using relevant multimedia physical quantity;
Step 12) peripheral interface and extensibility design: the video sensor module is in design process, reserved sufficient interface, comprise JTAG programming and debugging interface, CPLD DLL (dynamic link library), CPLD debugging interface, memory/bus diagnostic interface, 51 pin UbiCell connecting interfaces and surpass 40 main control module input/output interfaces, so that the continuity of debugging from now on, expansion and subsequent product exploitation;
The step 13) system reliability design: the system reliability design among the present invention has mainly comprised Anti-interference Design and fault-tolerant design: Design of Software Anti-interference is the householder method of hardware anti-interference design, adopt digital filtering that suppresses superposition noise on signal path and the method that reduces redundant instruction, adopt reduced instruction set; When hardware was out of order, the rapid perception of software energy was also taked corresponding remedial measure, to some special datas, can adopt the ciphertext form to send.
Beneficial effect: the present invention has compared following several advantage and limitation with more existing wireless multimedia sensor node designs, has provided a kind of new approaches of design of node simultaneously:
(1) takes sensor assembly and processing communication module to separate the design philosophy of independent design, connect by expansion interface between the two.Sensor assembly mainly comprises transducers such as imager, microphone collecting device and temperature, humidity, and its effect is to gather the environment media data.The major function of handling communication module has: the multi-medium data of gathering is carried out preliminary treatment and compression, node task management, storage administration, power management, communication mechanism etc.This composite type hardware system structure can be realized the independent assortment between different sensors module and the processing communication module, satisfies the monitoring requirements of different application neatly.
(2) synchronization acquistion of video information must have the clock of two-forty to cooperate with it, it is quite complicated simultaneously these data being carried out programmed process, and the high integration cmos imager that these two factors cause some to have low energy consumption and medium image quality is difficult to be used on the light-type main frame (such as UbiCell) that only has the simple process ability.In order to address this problem, the present invention is ingenious to have designed CPLD and memory circuitry is realized high speed data transfer, has designed a processor on the video module simultaneously, for the external world provides a simple interface.The combination of these devices makes this video sensor module can be applied to various optical sensings field flexibly, and it solved and imager between the high speed connection request, simultaneously can obtain the interested video information of primary application program with lower speed by Embedded system bus.This design makes some light-type main frames also have the function of video sensing, has expanded the practical application area of this category node.
Therefore (3) wireless multimedia sensor node that this scheme realized has low-power consumption video capture and disposal ability, has prolonged the useful life of node, and the computing capability of node and to catch the size and the quality of image also limited; Simultaneously, other video sensor nodes relatively, this design of node cost is lower, can be deployed in surveyed area in a large number and reach better coverage.Therefore it is limited and for the less demanding application of picture quality that this node is suitable for energy consumption, such as for node being arranged in some no man's lands, changes the battery difficulty and also will guarantee the useful life that node is certain simultaneously.
Description of drawings
Fig. 1 is the system configuration schematic diagram of multimedia sensor node of the present invention;
Fig. 2 is the simplification hardware structure diagram of video sensor module of the present invention;
Fig. 3 is the component software structure chart of video sensor module of the present invention.
Embodiment
The present invention mainly tells about based on video sensor Module Design on the light-type main frame UbiCell basis.Wireless multimedia sensor node takes sensor assembly and processing communication module to separate the design philosophy of independent design, connects by expansion interface between the two.The video sensor module mainly is made up of five submodules: processor module, video acquisition module, CPLD module, external memory modules and peripheral interface module.Finish the seizure of video by the collaborative work of a plurality of modules, and be kept on the memory that extends out, processor can reference to storage carry out any specific image by system bus and handle operation, can realize mutual with main frame by 51 pin expansion interfaces of standard simultaneously.The Design of System Software of video sensor module need realize following three kinds of assemblies: driver, and built-in function collection and sensor application program adopt based on modularization, and the method for top-down refinement is successively finished Design of software.
The present invention adopts the method for software-hardware synergism design, and promptly in hardware designs, the relevant simulation software of utilization carries out commissioning test to subprogram, so just can shorten the construction cycle.Below in conjunction with accompanying drawing the present invention is described in detail.Should be clear and definite, following content only is used for describing the present invention and not as limitation of the present invention.
The specific design method and the development procedure of multimedia sensor node are:
The major function of the clear and definite node of step 1).On the basis that the data transfer mode of wireless multimedia sensor network and multimedia sensor node is furtherd investigate, clear and definite design of node subject matter to be solved, the i.e. processing in the seizure of video and later stage.The major function of multimedia sensor node is to gather multimedia messagess such as audio frequency, video, image, and can simply handle, and comprises compression, identification, fusion etc., and transmits the data that other nodes are sent.Require node to have high system reliability and high integration simultaneously, real-time analysis preferably and disposal ability, high transfer of data accuracy.
Step 2) the basic architecture design of node.The structure of multimedia sensor node has been inherited the mentality of designing of traditional sensors node, on hardware, mainly form by two parts, the one, sensor assembly (sensor module), another is processing/communication module (process/communication module), as shown in Figure 1.Connect by expansion interface between the two, whole system is bottom-up to be divided into: hardware platform layer, embedded system kernel and application layer:
(1) hardware platform layer.Hardware platform is the underlying platform and the hardware foundation of whole node.Comprised the set that all hardware modules of node are formed and system bottom calls.Each composition module of node is carried out comprehensive and co-ordination.Simultaneously, defined the bus unit of node, interrupt system and mode of operation etc.
(2) embedded system kernel.The embedded system kernel is operated between bottom hardware platform and the upper level applications, finish the driving of each hardware device, the methods that provide software and hardware system to call for the application layer exploitation provides interface service, make the exploitation of upper level applications can shield the bottom hardware platform fully simultaneously.System kernel at the special requirement of sensor node, has improved the interruption controls strategy, process scheduling strategy and memory management policy simultaneously based on the management and dispatching strategy of real time operating system.
(3) application layer.Application layer provides application oriented system control mode and method of work for the user.The user can be according to different separately application demands, and the exploitation different application is finished a series of application functions such as startup, operation, state transition, information processing, signal transmission, energy consumption early warning and program download of node.
Step 3) node hardware module is divided.The present invention mainly is an extending video sensor assembly on the UbiCell node, and UbiCell is the product of having realized, repeats no more.The video sensor module mainly is made up of five modules: processor module, video acquisition module, CPLD module, external memory modules and peripheral interface module.The annexation of each intermodule as shown in Figure 2.
The design of step 4) processor module.At first to select suitable processor, because the processor on the video sensor panel mainly is the operation of collaborative each module and provides a connecting interface for the upper strata main frame, complexity is lower, therefore from controlling cost and the angle of power consumption considers that we have selected 8 Low-Power CMOS microprocessor ATmega128L based on the AVR risc architecture.It has abundant addressing system, succinct core instructions (one-cycle instruction time of implementation), higher processing speed (8M crystal-driven, instruction cycle 125ns), data storage in a large amount of register and the sheet, make it to have powerful disposal ability, data throughput is up to 1MIPS/MHz, real-time is good, and these are crucial unusually for the real-time application system of picture video monitoring and so on.In addition, the ATmega128L single-chip microcomputer has relatively abundant sheet external tapping, makes the design of whole video sensor module circuitry become unusual and simplifies, and has reduced the power consumption and the volume of node.
The design of step 5) video acquisition module.Imager (being video acquisition module) is a video sensor module most important component, considers that the UbiCell node mainly is towards simple video surveillance applications, can select low cost, low-power consumption and the miniature phase that only has the primary image disposal ability.Main connection processing device of this module and CPLD module are provided with the parameter of imager by processor, and catching of image needs high-frequency clock, and this clock can be provided by CPLD.
Step 6) CPLD modular design.This module mainly is to cooperate processor to carry out video capture.At first it can provide image to catch needed high-frequency clock, when the needs images acquired, the single-chip microcomputer CPLD is set to the Image Communication pattern to provide high frequency clock to imager, indicate CPLD to catch picture frame and be stored in the original position of internal memory then from imager, the next picture frame of the seizure of CPLD is after acquisition operations finishes, CPLD sends interrupt requests to processor, and notification processor seizure vision operation is finished.In addition, CPLD can provide the specific specialists logic to realize quick hardware operation.
The design of step 7) external memory storage.The external memory storage of video sensor module mainly comprises SRAM and FLASH.Multimedia sensor node can utilize the SRAM that extends out, with the internal memory of the limited internal processor of accelerating, for the storage of the image of processor with handle necessary space is provided.Though memory bit is in the outside of processor, it still can be counted as a normal memory space of node.Outside FLASH can hold large-scale nonvolatil data, needs the sensing of permanent storage potentiality (as template matches) thereby enlarged.Processor and CPLD communicate by rambus and share SRAM and flash memory.
The design of step 8) software system architecture.The harmonious operation of all real-time tasks of the system software controls of video sensor module, system carries out resource management according to mission requirements, Message Processing, task scheduling, abnormality processing, and distribution priority, system is according to the priority of each task, dynamically switches and dispatches.The software of video sensor module intends adopting the nesC language to write, and runs on the TinyOS operating system environment.TinyOS is the operating system of an open true form, be specifically designed to the wireless built sensor network, it has an event driven execution model, is initiated by the bottom assembly that directly acts on hardware, and finally arrives application layer component by a series of component passes.The software architecture of video sensor module is made up of different objects or assembly, and these objects or assembly communicate by the good interface of predefined.Mainly comprise following three kinds of assemblies: driver, built-in function collection and sensor application program.Video sensor module software modular construction as shown in Figure 3.
The design of step 9) driver component.The processor that driver component makes can communicate with different peripheral hardwares, makes each hardware module to work normally simultaneously.The video sensor module mainly comprises following several driver: imaging setting and catch driver is used for identification and control of video acquisition module; The CPLD driver drives CPLD and finishes the collection and the storing process of video; The FLASH driver, identification FLASH, the permanent mass data storage ability of expansion node; And make the driver that the video sensor module can communicate with main frame UbiCell.
Step 10) built-in function collection component design.Library file comprises multiple different set, wherein it is important various matrix operations, statistics and histogram library file.These library files are the keys of raw video being carried out any processing.Other library file may approachingly be used (algorithm), as is used for finishing specific high-level task object detection or motion vector identification library file.
The design of step 11) sensor application program assembly.The sensor application program is the main sensory package of video sensor module.It receives suitable instruction from main frame, and the necessary sensing operation of responsible main frame requirement.In fact the Application in Sensing program makes node become intelligence sensor, makes node independently, accurately to gather with the relevant multimedia physical quantity of practical application.
Step 12) peripheral interface and extensibility design.The video sensor module is in design process, reserved sufficient interface, comprise JTAG programming and debugging interface, CPLD DLL (dynamic link library), CPLD debugging interface, memory/bus diagnostic interface, 51 pin UbiCell connecting interfaces and surpass 40 main control module input/output interfaces, so that debugging from now on, expansion.
The step 13) system reliability design.System reliability design among the present invention has mainly comprised Anti-interference Design and fault-tolerant design.Design of Software Anti-interference is the householder method of hardware anti-interference design.Among the present invention, adopt digital filtering that suppresses superposition noise on signal path and the method that reduces redundant instruction, adopt reduced instruction set.When hardware was out of order, the rapid perception of software energy was also taked corresponding remedial measure, to some special datas, can adopt the ciphertext form to send.