INTRODUCTION 1.1/ PROBLEM STATEMENT

The concept of nanotechnology was mentioned for the first time by Richard Feynman, in 1959. In his famous speech, "There's Plenty of Room at the Bottom", Feyman described that the manipulation of atoms would provide more functional machines. More than half century later, nanotechnology is enabling the development of nano-electroniccomponents (e.g., nano-processors, nano-memories, nano-batteries, etc.) at nanoscale, and the integration of these components yields a nanodevice with new properties which are not available with previous technology. A nanodevice has capabilities for sensing, processing and communicating to perform simple tasks. Nanonetworks, i.e., networking of nanodevices, enhance the capability of a single nano-machine to perform complex tasks. For example, nanonetworks allow the detection of virus, harmful bacteria, cancerous cell [START_REF] Gand | Detection of nonpolar molecules by means of carrier scattering in random networks of carbon nanotubes: Toward diagnosis of diseases via breath samples[END_REF][START_REF] Tallury | Nanobioimaging and sensing of infectious diseases[END_REF] in very low concentrations (up to one part per billion) [START_REF] Schedin | Detection of individual gas molecules adsorbed on graphene[END_REF].

A nano-machine is a very small machine (with total dimension between 1 and a few cubic micrometers). They are often used to sense the world at molecular scale. Due to its small dimension, it has limitations in terms of battery capacity, computational complexity, and transmission range [START_REF] Akyildiz | Nanonetworks: a new communication paradigm[END_REF]. Interconnecting nanosensors, i.e. wireless nanosensor networks, will be able to overcome these limitations. Moreover, connecting wireless nanosensor networks to Internet networks allows worldwide access to the observation at molecular scale [START_REF] Jornet | The internet of multimedia nano-things[END_REF]. This property will enable many advanced applications in various fields, e.g., biomedical, military, and multimedia. For example, in biomedical field nanosensors with nano-camera [START_REF] Liu | High spatial resolution photodetectors based on nanoscale three-dimensional structures[END_REF][START_REF] Hegg | Nanogap quantum dot photodetectors with high sensitivity and bandwidth[END_REF] and nano-heater [START_REF] Falconi | Wireless joule nanoheaters[END_REF] will improve antimicrobiology, where nanosensors have the ability to detect transmissible agents (such as fungi, bacteria, viruses, spore forms) and various cancer cells, then kill them by heat [START_REF] Akyildiz | Electromagnetic wireless nanosensor networks[END_REF]. Nano-devices can also be used for targeted drug delivery [4], where antibodies or single stranded DNA chains can be tied up to specific target cells. Note that, even if nanodevices are small, data size exchanged among them can be very big, as is the case for nano-camera or medical applications for example.

Currently, there are two alternatives for communication in nanonetworks. In molecular communication, sender encodes information in molecules and release them in the environment, and receiver decodes the information upon their reception [START_REF] Nakano | Molecular communication and networking: Opportunities and challenges[END_REF]. The second type is the classical electromagnetic communication, used in this thesis.

Due to limited battery capacity and the difficulties to replace the battery in nanodevices, energy efficient methods should be implemented to prolong the nanodevices lifetime.

Nanodevices equipped by nano-cameras allow the development of multimedia nanodevices which provide visual observation at micro and nano scales. This feature enables the novel applications such as transmissible agents detection and efficient drug delivery system. Since nano-devices have limited computational complexity, simple image compression would be the best solution to obtain energy efficiency in nanocommunications.

In [START_REF] Jornet | Information capacity of pulse-based wireless nanosensor networks[END_REF], the authors show that nano-antenna based on a derivative of graphene, carbon nanotube (CNTs) and graphene nanoribbons (GNRs), resonate at the terahertz band (0.1-10 THz). High path-loss and molecular noise at terahertz band may produce transmission error in nanocommunications. In order to obtain reliable data transmission, error control should be implemented. In error control, two approaches can be used: Automatic Repeat Request (ARQ) and Forward Error Correction. The limited energy capacity in nano-battery and high transmission error in terahertz band may prohibited the use of ARQ techniques. For example, high transmission error rate require large number of retransmission (data packet), which consumes more energy and increases the transmission time. In addition, the errors may occur on the acknowledge packet, which increases the system complexity. Moreover, the limited computational complexity in nanomachine prohibited the use of complex forward error correction techniques. As a result, simple error correction method would be the best solution for nanocommunications.

1.2/ OBJECTIVES OF THE THESIS

The objectives of the thesis are to investigate the energy efficient and reliable error correction codes for multimedia nanonetworks. Our propositions are presented in the following.

1.3/ PLAN OF THE THESIS

The thesis is organized as follows. In Chapter 2, we present the specificity of nanonetworks such as nanodevices, channel modeling, modulation, and low-weight codes for nanocommunications. First, we describe the nanodevices including the components in a nanodevice and the application of nanonetworks. Next, we present the communication part of nanonetworks such as terahertz propagation model and simple pulse-based modulation for nanocommunications. Then, we describe the low-weight codes to obtaine energy efficiency in communication process.

In Chapter 3, we present Nanonetwoks Minimum Energy (NME) code. Currently, pulsebased modulation is the only modulation scheme for the electromagnetic communication among nano-devices. Jornet and Akyildiz [START_REF] Jornet | Femtosecond-long pulse-based modulation for terahertz band communication in nanonetworks[END_REF][START_REF] Jornet | Information capacity of pulse-based wireless nanosensor networks[END_REF] proposed TS-OOK modulation in terahertz band, where a pulse spread in time is transmitted for bit 1, and silence for bit 0. Time between consecutive bits is fixed. It is clear that reducing the number of transmitted bits 1 in TS-OOK modulation yields energy efficiency. In [START_REF] Zainuddin | Nanonetwork minimum energy coding[END_REF] we proposed Nanonetwork Minimum Energy (NME) code. Most frequent symbols are mapped to codewords with fewer bits 1. In coding table, input symbols are sorted in decreasing order of their frequency, while codewords are sorted in increasing number of their weight. For codewords with the same weight, the sorting is done in increasing order of the number of sequential bits 1, which is a characteristic of terahertz band communications. NME saves energy depending on input data distribution, in some tests more than 50%, and in theory up to 100%.

Results also show that NME "is more vulnerable to channel errors, therefore it needs to be combined with error correction code". Moreover, we compare NME with other lowweight codes and investigate their performance in terms of information rate after coding, bandwidth expansion, multi-user interference, sequential bits 1 and robustness against transmission error.

In Chapter 4, we present our proposed method the simple and energy efficient image compression (SEIC) for nanocommunications. A node in Wireless Multimedia Nano-Sensor Networks (WMNSN) enables to sense multimedia information (scalar data, audio, image and video) at molecular scale. The main research challenge in WMSN is obtaining energy efficiency to prolong the node lifetime, due to limited battery capacity in a nanodevice. Moreover, the size requirement and limited complexity require simple methods to be implemented in design and development of a multimedia nanodevices. Thus, it is essential to reduce the energy consumption whether in computation or in communications process. Since communication consumes more energy than computation [START_REF] Pottie | Wireless integrated network sensors[END_REF], then reducing the number of data transmission in the expense of additional computation yield energy efficiency. This result motivates the use of image compression before data transmission in nanocommunications. SEIC compression is based on the use of transform coding, i.e., discrete cosine (DCT) and discrete wavelet transform transformation (DWT), followed by NME code. Moreover, we compare SEIC with well known image compression methods such as JPEG, JPEG 2000 and PNG in terms of energy efficiency and robustness against transmission errors. The results show that SEIC has a larger energy efficiency, a better visual quality than JPEG, and is more robust in case of transmission errors.

In Chapter 5, we present simple block nanocode (SBN). In wireless sensor networks, information from the observed phenomenon should be reliably transmitted to the end system, in order to initiate the right actions [START_REF] Akyildiz | Wireless Sensor Networks[END_REF]. Terahertz band (0.1-10 THz) is characterized by high molecular absorption and high molecular noise, which makes it vulnerable for data transmission. Thus, for reliable communication, nanonetworks require error control, such as automatic repeat request (ARQ) and Forward Error Correction (FEC). Complex and powerful FEC techniques cannot be directly implemented in nano-devices due to their limitations presented above. ARQ technique is prohibited due to limited energy (battery capacity) in nano-devices [START_REF] Jornet | Low-weight error-prevention codes for electromagnetic nanoneworks in the terahertz band[END_REF]. When the channel error is high, re-transmissions must be done frequently, which increases the delay and consumes more energy. Therefore, low complexity (simple) error correction coding is the best solution for nanocommunications. We propose Simple Block Nanocode (SBN) to provide reliability in electromagnetic nanocommunications. SBN is based on simple block code followed by NME code. We investigate the code performance by compare SBN with existing error control for nanocommunications such as repetition code, minimum energy code (MEC) and lowweight channel (LWC) in terms of bit error probability and metrics for image transmission, e.g., peak signal to noise ratio (PSNR) and structural similarity (SSIM). The results show that SBN outperforms LWC and MEC in error rate and computational complexity.

In Chapter 6, we present some applications of nanonetworks, which include the perpetual operation of nanonetworks, the effects of nanosensor movement, robust image transmission and video streaming in nanonetworks. We investigate the possibility of perpetual operation in nanocommunications by taking into account the energy capacity in nanobattery and energy harvesting rate in nano-power generator. Due to movement activity of nanodevices in dynamic environment, such as blood circulation in human body, we investigate the effects of nano-node movement in terms of pulse time shift, information capacity reduction, error rate and Doppler effect. Moreover, we propose SERC, which combines SEIC-DCT and SBN to obtain energy efficient and robust multimedia transmission in nanocommunications. The results show that SERC provides energy efficiency up to 70 % and no transmission error for distance up to 1 m. Furthermore, we simulate video streaming in nanonetworks using Nano-Sim, i.e., network simulator for nanocommunications in NS 3, and investigate its performance in terms of visual quality for various number of nodes and jitter. No packet lost in networks, instead the reordering at receiver, which requires improvement in communication protocol. We also investigate SERC performance in video transmission at terahertz networks in terms of energy efficiency and visual quality. The results show that SERC provides energy efficiency up to 80 % and better visual quality than uncoded.

Chapter 7 presents the general conclusion of our works.

The development in nanotechnology enables the fabrication of nanodevices, i.e., very small electronic devices with total volume up to several cubic micrometers [START_REF] Jornet | Femtosecond-long pulse-based modulation for terahertz band communication in nanonetworks[END_REF]. A single nanodevice has limited capabilities in sensing, data processing and communication. Nanonetworks, i.e., networking of nanodevices will expand the capabilities of an individual nanodevice in terms of complexity and coverage area. In this chapter, we present the specificity of electromagnetic nanocommunications, such as nanodevices, operating frequency of nano-transceiver, terahertz channel modeling, modulation, and energy efficient coding for nanocommunications, i.e., communication among nanodevices. Energy efficient coding is useful in nanocommunications, since nanodevices has a very limited energy and the coding process can be done in simple mapping process. Then, we propose methods in energy efficient coding for nanocommunications, which reduces the energy consumption in transmission process theoretically up to 100 %.

2.1/ NANODEVICES AND APPLICATIONS

Nanotechnology is providing solutions to overcome the limitations in downscaling microelectronics. One of the most promising nano-material is graphene, which is a oneatom-thick layer of carbon atoms in a honeycomb crystal lattice [START_REF] Geim | The rise of graphene[END_REF]. It is envisioned in [START_REF] Akyildiz | Electromagnetic wireless nanosensor networks[END_REF] that the fabrication of graphene-based nano-components (e.g., nanosensors, nanoprocessors, nano-batteries, etc.) will succeed in the coming years. The integration of nano-components yields a functional nanodevice, which enables the sensing capabilities (measuring the scalar and multimedia data of physical, biological and chemical events/phenomenons) at micro-scale.

Nanodevices can be developed using three approaches, such as top-down, bottom-up and bio-hybrid [START_REF] Akyildiz | Electromagnetic wireless nanosensor networks[END_REF]. In top-down approach, nanodevices is obtained by downscaling the current microelectronic and micro-electro-mechanical components (processor, memory, etc) to nano scale, and these components are fabricated using nano-materials, e.g., graphene. In the bottom-up approach, nanodevices is obtained from molecular components, which is assembled chemically by principles of molecular recognition arranging molecule by molecule. The latest approach, bio-hybrid is based on the use of existing biological nano-devices, e.g., molecular motor. In Fig. 2.1, the different systems are mapped from their original domain (biological or man-made) and their size, which is ranging from Figure 2.1: Approaches for the development of nanodevices [START_REF] Akyildiz | Electromagnetic wireless nanosensor networks[END_REF]. meters to nanometers.

2.1.1/ NANODEVICES

We define a nanodevice as an integrated device with total size up to a few cubic micrometers with very simple and limited capabilities. Nanodevices are able to process the information received from nanosensors and forward it to the end system. These novel nanodevices will overcome the limitation of existing wireless multimedia sensor networks in terms of resolution (e.g., higher quality image and audio) and information rates (e.g., Tbps throughput) [START_REF] Jornet | The internet of multimedia nano-things[END_REF].

The optical and electronic properties of graphene enable the development of nanoelectronic devices, such as nano-processor, nano-sensors, nano-memories, nanobatteries, etc. Moreover, graphene enables the miniaturization of nano-camera based on photo-detectors and nano-microphone based on acoustic nano-transducers, which allows the generation of multimedia data sensing at molecular scale. The concept of multimedia nanodevice is shown in Fig. 2.2 [START_REF] Jornet | The internet of multimedia nano-things[END_REF]. Due to its small dimension (up to a few cubic micrometers), the multimedia nanodivices can be easily inserted into the observed objects, e.g., human body for health care applications.

2.1.1.1/ NANOSENSOR UNIT

Nanosensor unit consists of scalar nanosensor and multimedia nanosensor, as follows:

• Scalar nanosensors: Graphene and its derivation, Carbon Nanotubes (CNTs) and Graphene Nanoribbons (GNRs) can be used to create physical, chemical or biological nano-sensors. The working principle of CNT Field-Effect Transistor (CNT-FET) based nanosensor under physical, chemical and biological perturbations is shown in Fig. 2.3. In any case, when the CNT is directly affected by the perturbation, it modifies the electrical properties of the transistor. Due to their small dimension, nanodevices are able to measure chemical compounds in concentration as low as one part per billion and detect the presence of virus, bacteria or cancerous cell.

• Multimedia nanosensors: Nano-cameras consist of graphene-based photodetectors [START_REF] Liu | High spatial resolution photodetectors based on nanoscale three-dimensional structures[END_REF], with capabilities such as: very small pixel size (< 100 nm), very high sensitivity at very low-light conditions and very low power consumption. Nano-phones Figure 2.2: Conceptual architecture of multimedia nanodevice [START_REF] Jornet | The internet of multimedia nano-things[END_REF].

consist of graphene based nano-acoustic transducers with high directional resolution and very good frequency resolution [START_REF] Smith | Design and fabrication of ultrasonic transducers with nanoscale dimensions[END_REF].

2.1.1.2/ NANO-PROCESSOR UNIT

Recent advances in the miniaturization of Field-Effect Transistor (FET) are enabling the development of nano-transistor. The smallest graphene-based transistor that has been experimentally tested is just 10 by 1 carbon atoms, which is less than 1 nm in all its dimensions [START_REF] Ponomarenko | Chaotic dirac billiard in graphene quantum dots[END_REF]. Moreover, graphene-based transistors are able to operate at ultra high switching frequencies (up to 155 gigahertz) [START_REF] Wu | High-frequency, scaled graphene transistors on diamond-like carbon[END_REF]. The computation complexity that can be supported by nano-processor depends on the number of integrated transistors in the chip, as function of size.

2.1.1.3/ NANO-MEMORY UNIT

The main challenge in nano-memories is the ability to store 1 bit information in 1 atom as suggested by Feynman in 1959. He also suggested to use 125 atoms to prevent interference between adjacent memories. This result is comparable to the use of 32 atoms to store 1 bit information in DNA [START_REF] Bennewitz | Atomic scale memory at a silicon surface[END_REF], which is equivalent to the storage density more than 1 bit/nm 3 or 1 gigabit/µm 3 . Monolayers of gold on a silicon surface is used to define the tracks, as shown in Fig. 2.4. The writing and reading processes are performed by the present or the absent of silicon atoms.

2.1.1.4/ NANO-ANTENNA AND TRANSCEIVER UNIT

One micrometer long graphene-based nano-antenna is efficient to resonate at terahertz band (0.1-10 THz). This spectrum frequency matches with the operating frequency of graphene-based nano-transceiver, such as signal generator, signal detector, filter, modulator, frequency mixer and multiplier. The communication unit allows the sensed information (e.g. scalar data, audio, image and video) at molecular scale to be transmitted to the end system for further diagnostic. The conceptual design of graphene-based nanoantenna is shown in Fig. 2.5, where L is the antenna length, W the width and h the dielectric high. The potential vector approach as in [START_REF] Jornet | Graphene-based nano-antennas for electromagnetic nanocommunications in the terahertz band[END_REF], requires L > W h. The resonant frequency varies between 500 GHz and 4 THz, when L = 1 µm.

2.1.1.5/ NANO-POWER UNIT

Due to its small dimension, nanodevices have limited battery capacity (energy limitation) and the difficulty to change the battery. As a result, energy harvesting is an important aspect in the realization of nanonetworks. One of the promising techniques for energy harvesting is using piezoelectric effect in zinc oxide nanowires, which converts the vibration energy into electrical energy, as shown in Fig. 2.6. Next, this energy is stored in a nano-battery and dynamically consumed by nanodevice [START_REF] Jornet | Joint energy harvesting and communication analysis for perpetual wireless nanosensor networks in the terahertz band[END_REF]. Our targeted application are multimedia nanocommunications, which consumes much energy due to large data size of multimedia contents. In next sections, we investigate the perpetual operation of multimedia nanonetworks, by taking into account the nano-battery capacity, energy harvesting rate and energy consumption rate.

2.1.2/ APPLICATIONS OF NANONETWORKS

Nanonetworks enable novel applications in diverse fields, as follows:

2.1.2.1/ BIOMEDICAL FIELD Nanosensors can be deployed inside the human body (e.g., a pill or intramuscular injection) to monitor glucose, sodium, and cholesterol level [START_REF] Dubach | Flourescent ion-selective nanosensors for intracellular analysis with improved lifetime and size[END_REF][START_REF] Li | A cholesterol biosensor based on entrapment of cholesterol oxidase in a silicic sol-gel matrix at a prussian blue modified electrode[END_REF], to detect osteoporosis, to detect infectious agents, such as virus, bacteria [START_REF] Tallury | Nanobioimaging and sensing of infectious diseases[END_REF], and cancer cell [START_REF] Tothill | Biosensors for cancer markers diagnosis[END_REF]. Next, the sensed information can be sent to the health care center through wireless interface such as a cell phone as shown in Fig. 2.7. Moreover, nanosensors can be used for targeted Figure 2.4: Atomic memory using single silicon atoms on gold tracks [START_REF] Akyildiz | Electromagnetic wireless nanosensor networks[END_REF].

drug delivery [4], where antibodies or single stranded DNA chains can be tied up to specific target cells. For example, nanonetworks in human body display the sick organ in holographic 3D form, which enables psychiatrist to see the organ without surgery.

2.1.2.2/ ENVIRONMENTAL FIELD

Nanonetworks enable the monitoring of connection among animals and plants. For example, tree, herbs, or bushes, release chemical composites to the air to invite the natural predators of the insect that are attacking them, or to regulate their blooming among different plantations [START_REF] Pieterse | Plant interactions with microbes and insects: from molecular mechanisms to ecology[END_REF]. Nanonetworks can be built around classical sensor devices which are already deployed in agriculture fields. Nanonetworks can increase the crop and livestock management by controlling fertilizer concentration [START_REF] Joseph | Nanotechnology in agriculture and food[END_REF]. Nanonetworks can also be used to monitor freshwater quality in unreachable locations or to control air pollution [START_REF] Riu | Nanosensors in environmental analysis[END_REF].

2.1.2.3/ INDUSTRIAL, CONSUMER GOODS AND MILITARY FIELD

Nanonetworks can be used to monitor the manufacturing process and quality control procedures. The development of nanodevices enable Wireless Network on Chip (WNoC) [START_REF] Llatser | Graphene-enabled wireless networks-on-chip[END_REF], which allows very high transmission rate communication among multi-core processor architecture. Nanosensors can detect dangerous levels of bacteria food packaging at finer scale. Multimedia nanonetworks enable paint detection in health monitoring system. Multimedia nanonetworks can also be used to provide high quality holographic video conference as shown in Fig. 2.8. In military field, nanonetworks can be used to monitor the nuclear, biological and chemical (NBC) attack at molecular scale [START_REF] Jornet | The internet of multimedia nano-things[END_REF].

2.2/ COMMUNICATION IN NANONETWORKS

Communication in nanonetworks can be performed in four ways: nano-mechanical, acoustic, molecular and electromagnetic [START_REF] Rikhtegar | A brief survey on molecular and electromagnetic communications in nano-networks[END_REF]. In nano-mechanical communications, junctions between linked nanodevices are used for data transmission. Nano-mechanical enables a few number of nanodevices, due to the difficult process in manipulating the junction at nano-scale. In nano-acoustic communications, ultrasonic waves are used for data Figure 2.5: The conceptual design of nano-antenna [START_REF] Jornet | Graphene-based nano-antennas for electromagnetic nanocommunications in the terahertz band[END_REF].

communications. This method requires the development of nanoscale ultrasonic transducer, which is unfeasible for current technology. As a result, molecular and electromagnetic approaches are the promising methods for nanocommunications.

Molecular communication is defined as the transmission and reception of information encoded in molecules [START_REF] Akyildiz | Electromagnetic wireless nanosensor networks[END_REF]. The advantage of molecular nanocommunications is the size of its nanodevices, e.g., molecules, organelles and living cells, are already at nano-scale. Moreover, it is suitable for medical applications in biomedical field, since the devices and medium are already in nature. The limitation in molecular nanocommunications are the extremely low data rates and its performance depends of environmental condition, e.g., wind, tide, medium obstacles, etc [START_REF] Akyildiz | Nanonetworks: a new communication paradigm[END_REF].

Electromagnetic nanocommunications are defined as the transmission and reception of electromagnetic waves of components of nanomaterials [START_REF] Akyildiz | Electromagnetic wireless nanosensor networks[END_REF]. The development of graphene based nano-antennas for transmitting and receiving electromagnetic waves at terahertz band leads to the design and the protocol of electromagnetic nanocommunications. Electromagnetic nanocommunications will be presented in the following Sections.

The major research in nanocommunications was started by Ian F.

2.3/ ELECTROMAGNETIC NANOCOMMUNICATIONS

The miniaturization of classical antenna to several hundreds of nanometers (i.e., to meet the size requirements of a nano-component) provides very high resonant frequencies (a few hundreds THz). In general, higher operating frequency result in larger available bandwidth (higher transmission rate) and higher pathloss (higher transmission power). Since nanodevices are energy-constrained devices, increasing the transmission power should be avoided. Moreover, intrinsic material of common metal at nanoscale remains unknown, which maens that ideal perfect electric conductor (PEC) of antenna might not hold true anymore.

Recently, it has been shown that graphene nano-structure support the propagation of Surface Plasmon Polariton (SPP) waves at THz band. The SPP waves on graphene have been observed at frequencies as low as in THz, which can be easily tuned by material doping. In [START_REF] Hanson | Fundamental transmitting properties of carbon nanotube antennas[END_REF], the propagation speed of electromagnetic wave in CNTs can be up to one hundred times below the electromagnetic propagation speed in the freespace. Therefore, the resonant frequency of CNT-based nano-antennas can be up to two orders of magnitude below the classical antenna. This result also matches with operating frequency of graphene-based nano-transceiver components, such as modulators, signal detector, filter, frequency-mixer and multiplier. As a result, terahertz band will be the operating frequency of electromagnetic nanocommunications.

Electromagnetic communication among nanosensors must specify the ability of nanomaterials to radiate and receive electromagnetic waves. In [START_REF] Jornet | Information capacity of pulse-based wireless nanosensor networks[END_REF], Jornet and Akyildiz show that nano-antenna based on a derivative of graphene, carbon nanotube (CNTs) and graphene nanoribbons (GNRs), resonate at the terahertz band (0.1-10 THz). Terahertz band is the least explored operating frequency for communication purpose, while the operating frequencies below (e.g. microwaves) and above (e.g. far infrared) this band have been extensively investigated. The existing terahertz band models are used for communication with coverage distance of several meters far. Signal attenuation in terahertz band is function of distance and molecular composition along the transmission path. The attenuation in terahertz band can be very large (hundreds of dB/m). Hence, the targeted transmission distance for nanocommunications is below 1 m, which provides much smaller signal attenuation than communication in macro world.

Jornet and Akyildiz [START_REF] Jornet | Channel modeling and capacity analysis for electromagnetic wireless nanonetworks in the terahertz band[END_REF][START_REF] Jornet | Femtosecond-long pulse-based modulation for terahertz band communication in nanonetworks[END_REF] developed a novel propagation model for terahertz channel based on radiative transfer theory [5] and HITRAN (HIgh resolution TRANsmission molecular absorption database), an online catalog [START_REF] Rothman | The HITRAN 2008 molecular spectroscopic database[END_REF], then validated the model using COMSOL Multiphysics results show that terahertz band with large available bandwidth (almost 10 THz) supports very high transmission rate, in the order of few Terabits per second (Tbps) for transmission distances below 1 m.

2.3.1/ TOTAL PATH LOSS

Pathloss and noise at terahertz band depend on the molecular compositions and the transmission distances. The pathloss in terahertz band is composed by the spreading loss and the molecular absorption loss [START_REF] Jornet | Channel modeling and capacity analysis for electromagnetic wireless nanonetworks in the terahertz band[END_REF]. The spreading loss is the attenuation when a wave propagates through the medium, while absorption loss is the attenuation due to absorbed wave's energy by molecules along the transmission path, which converts the part of wave energy into internal kinetic energy at the molecule level. The molecular absorption loss in dB is:

A abs ( f, d) = -10 log 10 (τ( f, d)) (2.1)
where f is the wave frequency, d the path length, and τ the transmittance of the medium.

The transmittance of medium can be calculated using Beer-Lambert law [5]:

τ( f, d) = e -k( f ) d (2.2)
The medium absorption coefficient k( f ) depends on the medium composition, i.e., type of molecules, concentration, temperature, etc. This can be obtained from HITRAN (HIgh resolution TRANsmission molecular absorption) database [START_REF] Rothman | The HITRAN 2008 molecular spectroscopic database[END_REF].

The spreading loss is the attenuation because of their expansion as long as they propagate through the medium, i.e., free-space loss. This attenuation is expressed in dB by:

A spread ( f, d) = 20 log 10 4 π f d c (2.3)
where f is the wave frequency, d the path length and c the speed of light in the vacuum. Finally, the total path loss or attenuation, A( f, d), is expressed in dB as the addition of two previous attenuation terms:

A( f, d) = A spread ( f, d) + A abs ( f, d) (2.4)
Figure 2.8: Multimedia application in Nanonetworks [START_REF] Jornet | The internet of multimedia nano-things[END_REF].

Using HITRAN, total pathloss as a function of distance and frequency is shown in Fig. 2.9.

For transmission distance below 1 mm, the attenuation is very small. As the distance increases, the pathloss greatly increases too. For example, when the transmission distance is above 1 m, the pathloss is more than 250 dB for frequencies above 1 THz.

2.3.2/ MOLECULAR NOISE

Molecules along the transmission path not only absorb the electromagnetic wave, but also re-radiate the wave at the same frequency with the incident wave. This effect is known as molecular absorption noise [START_REF] Jornet | Channel modeling and capacity analysis for electromagnetic wireless nanonetworks in the terahertz band[END_REF]. Absorption noise is characterized with the parameter emissivity of channel ε as

ε( f, d) = 1 -τ( f, d) (2.5)
The equivalent noise temperature of omnidirectional antenna can be obtained as:

T mol ( f, d) = T 0 ε( f, d) (2.6)
where T 0 is the reference temperature.

There are several other noises in nano-scale, such as environment noise, nano-electronic noise temperature, antenna noise temperature, etc. For the time being, there is no accurate noise model for graphene-based electronic devices, but the initial prediction shows that nanomaterial has a very low noise factor [START_REF] Pal | Ultralow noise field-effect transistor from multilayer graphene[END_REF]. Therefore, we use only the molecular absorption noise as noise in nanoscale. The molecular absorption noise can be computed as follows:

P n ( f, d) = B k B T 0 ε( f, d) d f (2.7)
where B is the channel bandwidth and k B the Boltzmann constant.

2.4/ TS-OOK MODULATION

Due to energy capacity and its simplicity, the only feasible modulation so far for electromagnetic nanocommunications is based on pulses. Carrier-based modulation, e.g., Binary Phase Shift Keying (BPSK), requires continuous transmission of sinusoidal signal for all transmitted bits, which consumes energy during the whole transmission time.

Since nanodevices have strict limitation in energy capacity, then carrier-based modulation is unfeasible for nanocommunications. In contrary, pulse-based modulation, e.g., On-Off Keying (OOK), consumes the energy when transmitting bits 1 as pulse transmission and silence for bits 0. Therefore, pulse-based modulation is preferable for nanocommunications.

Pulse-based modulations have been used in wireless communication systems, such as Impulse Radio Ultra Wide Band (IR-UWB). IR-UWB uses 100 picosecond-long pulses at 3.1-10.6 GHz band, which satisfies the FCC spectral mask [START_REF] Oppermann | UWB: Theory and Applications[END_REF]. The pulses are sent using Pulse-Position Modulation (PPM) or Pulse Amplitude Modulation (PAM) with Time Hopping orthogonal sequences. PPM and PAM outperform OOK in terms of error rate, i.e., lower bit error probability at the same signal to noise ratio (SNR). PPM and PAM require more complex signal processing than OOK, since they use multi-level signaling. Therefore, OOK is used when simplicity is the main consideration.

Compact plasmonic signal generators and detectors at terahertz band are being developed [START_REF] Knap | Plasma wave oscillations in nanometer field effect transistors for terahertz detection and emission[END_REF] [74], which are suitable for nanodevices. The terahertz transmitter excites terahertz SPP waves from a compact structure built on a High Electron Mobility Transistor (HEMT). Pulses cannot be transmitted in burst, due to the relaxation time of SPP waves in the HEMT channel [START_REF] Jornet | Femtosecond-long pulse-based modulation for terahertz band communication in nanonetworks[END_REF].

Jornet and Akyildiz. [START_REF] Jornet | Femtosecond-long pulse-based modulation for terahertz band communication in nanonetworks[END_REF] proposed the time-spread On-off keying (TS-OOK) modulation based on very short pulses (one hundred femtosecond-long per Gaussian pulse). Such pulses have been used in terahertz imaging and biological spectroscopy [START_REF] Woolard | Nanoscale imaging technology for THz-frequency transmission microscopy[END_REF]. During the transmission process, binary 1 is considered as a pulse transmission, while binary 0 as silence (no energy required). In TS-OOK, the transmitted signal by a nanodevice i is:

s i T (t) = K k=1 A i k p(t -k T s -τ i ) (2.8)
where K is the number of bits per packet, A i k the amplitude of the k-th bit transmitted by the nanodevice i, p(t) the pulse with duration T p and T s the time between consecutive bits, and τ i the random initial time. In TS-OOK, pulse duration is fixed and pulses are spread during a pulse period. The ratio between a pulse period T S and a pulse duration T P is the spreading factor β. In TS-OOK design, the spreading factor is preferred to be large, e.g., β = 1000. A large value of β has several advantages, such as:

• A relaxation on the energy harvesting process, which gives enough time to harvest energy for the next transmission.

• A channel relaxation, where molecules in the channel have enough time to fully release the absorption energy (absorption noise) from the previous transmitted pulse [START_REF] Jornet | Low-weight error-prevention codes for electromagnetic nanoneworks in the terahertz band[END_REF].

• A fine time resolution, where the probability of nearby located nodes transmitting pulse at the same time is smaller.

The received signal by a nanodevice j is:

s j R (t) = K k=1 A i k p(t -k T s -τ i ) * h i, j + n i, j k (t) (2.9)
where h i, j is the terahertz channel impulse response between the nanodevices i and j, n i, j k the molecular absorption noise between i and j. As described earlier, fine time resolution in TS-OOK modulation makes the probability of having collision between pulses very low. Moreover, not all types of collision are harmful [START_REF] Jornet | Information capacity of pulse-based wireless nanosensor networks[END_REF]. For example, collision between two pulses do not cause error, so do the silence. The received pulses in multi users case is:

s j R (t) = J i=1 K k=1 A i k p(t -k T s -τ i ) * h i, j + n i, j k (t) (2.10)
where J is the total number of users in the system.

To illustrate the effect of collision in multi users TS-OOK modulation, we use 3 nanodevices as shown in Fig. 2.10. Nanodevices 1 and 2 are the transmitter and nanodevice 3 is the receiver. Nanodevice 1 is closer to nanodivice 3 than nanodevice 2. As a result, the received pulse of nanodevice 1 has smaller attenuation, shorter delay and less noise. Pulse time T p = 1 ps and time between pulses is T s = 5 ps. Nanodevice 1 transmits the bit stream "1100001" and nanodevice 2 transmits "1001001". Receiver nanodevice 3 receives "1100101", which indicates that collision only harmful when pulse from other user is received during silence transmission.

The TS-OOK pulse uses the first derivation of the Gaussian pulse. The Gaussian pulse is as follows: where a 0 is the normalizing constant to adjust the total pulse energy, σ the standard derivation of Gaussian pulse, µ the pulse delay.

p(t) = a 0 √ 2πσ e -(t-µ) 2 /(2σ 2 ) (2.11)
The pulse energy in TS-OOK depends on the targeted distance between transmitter and receiver. The energy varies from 1 pJ [START_REF] Jornet | Joint energy harvesting and communication analysis for perpetual wireless nanosensor networks in the terahertz band[END_REF] to 1 aJ [START_REF] Jornet | Femtosecond-long pulse-based modulation for terahertz band communication in nanonetworks[END_REF]. The TS-OOK pulses with σ 100 fs and various pulse energies are shown in Fig. 2.11, which shows that the pulse duration is 1 pJ. The TS-OOK spectrum is shown in Fig. 2.12, which shows that the TS-OOK spectrum is within terahertz band (0.1-10 THz) and the peak at 1.6 THz.

2.4.1/ CHANNEL CAPACITY

The channel capacity is the maximum allowable transmission rate (in the channel) to have reliable communications (very small error rate) [START_REF] Proakis | Communication Systems Engineering[END_REF]. The channel capacity depends on the source and channel statistical properties. The channel capacity is derived from the maximum mutual information as follows:

C = max X { I(X, Y) } = max{ H(X) -H(X|Y) } (2.12)
where X is the input symbol, Y the output symbol, H(X) the source entropy, and H(X|Y) the channel equivocation. The source entropy H(X) is denoted by:

H(X) = i P i log 2 1 P i (2.13)
where P i is the probability of symbol i = {0, 1} to be transmitted. For example, P 1 is the probability to transmit the pulse, while P 0 is a silence. The channel equivocation is denoted by: where P(x i , y j ) is the probability of having a symbol x i in the input and the symbol y j at the ouput, and P(x i /y j ) is the probability of having transmitted an x i given by the output y j . Since the preferred parameter is P(y j /x i ), the parameters in the channel equivocation can be replaced using: The received signal is the pulse of the TS-OOK modulation that has been attenuated by the total path loss and the absorption noise. The probability density function (PDF) of the received signal is based on a statistical model of the molecular absorption noise [START_REF] Jornet | Femtosecond-long pulse-based modulation for terahertz band communication in nanonetworks[END_REF] given by the input i. It can be written as follows:

H(X|Y) = i, j P(x i , y j ) log 2 1 P(x i |y j ) (2.14) 0 1 2 -2.5
P(x i ,
P(Y|X = x i ) = 1 √ 2πN i e - (y -a i ) 2 2 N i (2.18)
where N i is the total noise power for the transmitted symbol x i and a i is the amplitude of the received symbol. By combining equations (2.12), (2.13), (2.17) and (2.18), the channel capacity (bits/symbol) becomes: The information rate IR, defined as the channel capacity in terms of bit/sec, for TS-OOK modulation can be obtained as follows:

C = max P i                 i P i × log 2 1 P i        -          1 i=0 1 √ 2πN i e - (y-a i ) 2 2N i P i × log 2          1 j=0 P j P i N i N j e - (y-a j ) 2 2N i + (y-a i ) 2 2N j          dy                   (2.19)
IR = B β × C (bit/second) (2.20)
The information rate for TS-OOK modulation for B = 10 13 (10 THz), β = 1000, with various pulse energy is shown in Fig. 2. [START_REF] Mathworks | Image Processing Toolbox: For use with Matlab[END_REF]. It shows that the larger the pulse energy, the larger the coverage area. For example, the coverage area using pulse energy 1 aJ is up to several centimeters, and the coverage area using pulse energy 1 pJ is up to several kilometers. We prefer to use TS-OOK pulse energy of 1 fJ, since such compact terahertz signal generator and detector have been reported in [START_REF] Vicarelli | Graphene field-effect transistors as room-temperature terahertz detectors[END_REF][START_REF] Knap | Plasma wave oscillations in nanometer field effect transistors for terahertz detection and emission[END_REF].

2.4.2/ ERROR RATES OF NANONETWORKS

The propagation effects at terahertz band (high attenuation and molecular noise) result in many bits received in error, especially for large transmission distance. The Bit Error Probability (BEP) is defined as the ratio between the number of bit errors and the number of transmitted bits. The BEP can be computed as follows:

P e = 1 i=0 P(e, X i ) = 1 i=0 P(e|X = i) P(X = i) (2.21)
where P(e|X = i) is the probability of bit error when bit i is transmitted and P(X = i) = P i is the probability to transmit bit i.

Due to the energy limitation in a nanodevice, currently the only feasible modulation is TS-OOK, which is a binary modulation. Bit detection in binary modulation is based on 1-bit hard decision [START_REF] Fuentes | A receiver architecture for pulse-based electromagnetic nanonetworks in the terahertz band[END_REF][START_REF] Jornet | Low-weight error-prevention codes for electromagnetic nanoneworks in the terahertz band[END_REF][START_REF] Akkari | Joint physical and link layer error control analysis for nanonetworks in the terahertz band[END_REF], in which, if the amplitude of received signal is larger than a threshold, it is detected as bit 1, elsewhere as bit 0. The power of received pulse at a distance d from its transmitter P can be computed as:

P(d) = B S X ( f ) |A( f, d)| 2 |H r ( f )| 2 d f (2.22)
where B is the channel bandwidth, S X the power spectral density of the transmitted pulse, A the channel frequency response given by (2.4) and H r the receiver's impulse response.

Electromagnetic nanocommunications can be modeled as discrete input X and continuous output Y. The total molecular absorption noise S N affecting the transmission of symbol i ∈ {0, 1} consists of the background atmospheric noise S N B and the self-induced noise S N X i [START_REF] Jornet | Femtosecond-long pulse-based modulation for terahertz band communication in nanonetworks[END_REF]. The power spectral density of total molecular noise can be obtained by:

S N i ( f, d) = S N B ( f ) + S N X i ( f, d) (2.23) S N B ( f, d) = lim d→∞ k B T 0 1 -|H abs ( f, d)| 2 |H R ant ( f )| 2 (2.24) S N X i ( f, d) = S X i ( f ) 1 -|H abs ( f, d)| 2 |H T ant ( f )| 2 |H spread ( f, d)| 2 |H R ant ( f )| 2 (2.25)
where k B is the Boltzmann constant, T 0 is the room temperature, H R ant and H T ant are the antenna frequency response at receiver and transmitter for an antenna that satisfies

|H T ant H R ant | = λ 2 0 /4π
, where λ 0 = c/ f 0 and f 0 is the center frequency of the pulse (around 1.6 THz). Therefore, the total molecular absorption noise power at the receiver N i when symbol i is transmitted is given by

N i (d) = B S N i ( f, d) |H r ( f )| 2 d f (2.26)
The probability density function of channel output Y for transmission bit X = i is as follows:

f Y (Y|X = x i ) = 1 √ 2πN i e - (y-a i ) 2 2N i
(2.27) where a i is the amplitude of received signal, which can be obtained from (2.22). Transmission channel is modeled as an asymmetric terahertz channel with the following error transition probabilities [START_REF] Jornet | Low-weight error-prevention codes for electromagnetic nanoneworks in the terahertz band[END_REF]:

P(e|X = 0) = P(Y = 1|X = 0) = 1 - B A
f Y (Y|X = 0) dy (2.28)

P(e|X = 1) = P(Y = 0|X = 1) = B A f Y (Y|X = 1) dy (2.29)
where A and B are two threshold values. These values can be computed from the intersection of two Gaussian distributions N(0, N 0 ) and N(a 1 , N 1 ) as follows:

A, B = a 1 N 0 ± 2N 0 N 2 1 log(N 1 /N 0 ) -2N 2 0 N 1 log(N 1 /N 0 ) + a 2 1 N 0 N 1 N 0 -N 1 (2.30)
where a 1 is the amplitude of the received pulse, and N i the total molecular absorption noise power at the receiver when symbol i is transmitted, as given by (2.26).

The transition probabilities of terahertz band using HITRAN (HIgh resolution TRANsmission) molecular absorption database [START_REF] Rothman | The HITRAN 2008 molecular spectroscopic database[END_REF] for pathloss computation and TS-OOK modulation with pulse energy 1 fJ is shown in Fig. 2.14. It shows that the transition probabilities of bit 0 and bit 1 are different, which means that the terahertz band is a binary asymmetric channel (BAC).

The BEP depends on pulse energy and source statistic (i.e., probability of bit 1). The BEP for various pulse energies is shown in Fig. 2.15. In order to meet the BEP requirement for specific application (e.g., the BEP for image transmission 10 -3 ), TS-OOK modulation with pulse energy 1 aJ can be used for transmission distance should be less than up to several centimeters, while 1 pJ for distance up to several meters. The BEP of TS-OOK modulation also depends on the probability of bit 1 P 1 in bitstream. Using eq. (2.21), the BEP with different P 1 is shown in Fig. 2. [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]. It shows that the smaller probability bit 1, the smaller BEP can be obtained. Another metric of error performance in communication theory is Codeword Error Probability (CEP). The CEP is defined as the average probability that the received codeword contains error bits at receiver. If a bit in the received codeword is wrong, then the whole codeword is wrong. The probability of correct codeword (no bit error in the received codeword) is calculated by:

P c = (1 -P e ) n (2.31)
where n is the size of codeword and P e the BEP given by eq. (2.21). Assuming bit errors are not correlated, the CEP is given by:

CEP = 1 -P c (2.32)
The CEP of TS-OOK modulation with different codeword length n is shown in Fig. 2.17. It shows that the smaller codeword length, the smaller CEP can be obtained.

2.5/ LOW-WEIGHT CODES

In TS-OOK, transmission of bit 1 is presented as pulse transmission and bit 0 as silence (no pulse transmission). So, it is clear that reducing the number of bits 1 improves energy use. This is the aim of low-weight codes. In order to obtain energy efficiency, some codes require large bandwidth expansion, thus increasing transmission time. Also, some codes are more robust than others, since for some of them a 1-bit error leads to several erroneous bits at receiver, i.e., a high error probability. In order to give an illustration on how low-weight codes work, we present Table 2.1 for used codes.

2.5.1/ MINIMUM ENERGY (ME) CODE

Erin et al. [START_REF] Erin | Energy optimal codes for wireless communications[END_REF] proposed minimum energy (ME) coding for known source statistics. The input symbols are sorted in decreasing order of their frequency. The codewords have the same size as input symbols and are sorted in increasing number of their weight (the weight is the number of 1s). As a result, the most frequent symbols are mapped to codewords with fewer 1s. The ME code with symbol size 3 bits is shown in Table 2.1.

2.5.2/ NANONETWORK MINIMUM ENERGY (NME) CODE

NME code [START_REF] Zainuddin | Nanonetwork minimum energy coding[END_REF] is similar to ME, with the difference in the sorting of the codewords with the same weight; the sorting is done so as to reduce the number of sequential bits 1, a useful feature for nanonetworks. The algorithm to reduce the number of sequential 1 in NME code is shortly explained below:

1. The codewords are sorted in increasing order of their weight.

2.

For each codeword with the same weight, the codeword is divided into two categories according to the existence of sequential 1 in codeword.

3.

Each category is then divided into two new categories according to existence of 1 at the beginning or at the end of codeword.

The only difference are mapping from input 011 and 010, where in ME 011 → 011 and 010 → 101, while in NME 011 → 101 and 010 → 011. Using illustration example in Table 2.1, this process is able to reduce 10 sequential 1. For larger input size, NME code will reduce more sequential bit 1.

2.5.3/ PRAKASH AND GUPTA (PG) CODE

Prakash and Gupta [START_REF] Prakash | Energy efficient source coding and modulation for wireless applications[END_REF] proposed a code for source with unknown statistics, by mapping the input symbols to predetermined codewords. In this method, all codewords have a maximum weight of 1. The data is cut in binary sequences of n bits, and each symbol of n bits is mapped to a codeword of m bits. In particular, input symbol 0 is always mapped to codeword 0. This method requires large codeword sizes, the minimum codeword size being m = 2 n -1. It has however a large energy efficiency since every codeword has a maximum weight of 1. For example, when n = 3, m = 7, the mapping table is shown in Table 2.1.

2.5.4/ NEW PG CODE

We propose a small variation of PG code (NPG, New PG). The only difference compared to PG is that codeword 0 is used for the most frequent input symbol, and the other symbols are mapped to codewords with weight 1. This means that, contrary to PG, NPG uses source statistics.

2.5.5/ MINIMUM TRANSMISSION ENERGY (MTE) CODE

Chi et al. [START_REF] Chi | Optimal coding for transmission energy minimization in wireless nanosensor networks[END_REF] proposed Minimum Transmission Energy (MTE) code, which modifies PG in order to have larger input size for the same codeword size; it does so by allowing the use of codewords with two consecutive 1s too (hence weight 2). Consequently, MTE code has a lower bandwidth expansion than PG code. MTE code is denoted by MTE (n, m), where n is input symbol size and m is output symbol size. The weight of i-th codeword w i is denoted by:

w =          0, if i = 1 1, if 2 ≤ i ≤ m + 1 2, if m + 2 ≤ i ≤ 2 n (2.33)
where i is the codeword index (starting with 1) and m sufficiently large. For example, when n = 3 and m = 4, the mapping table is as shown in where M = 2 n is the number of used symbols, and n is input symbol size. Codeword weight depends on the maximum probability of transmitted symbols P max . If P max is less than 0.5, the codeword weight is constant d min /2, elsewhere the codeword weight is 0 for symbol 0 and d min for others. If d min = 2, then there is no error correction and it behaves exactly like PG code.

2.5.7/ LOW-WEIGHT CHANNEL (LWC) CODE

Jornet [START_REF] Jornet | Low-weight error-prevention codes for electromagnetic nanoneworks in the terahertz band[END_REF] proposed Low-Weight Channel (LWC) code for transmission error prevention in nanosensor networks. It uses constant codeword weight. LWC code is denoted by LWC (m, n, w), where m is output size, n is input size, and w is codeword weight. The codeword weight depends on input size, and fulfills the following condition:

m w ≥ 2 n (2.35)
where m w denotes the number of combinations of w bits 1 in m bit codewords. For example, when m = 5, n = 3, and w = 2, the mapping table for LWC code is as shown in Table 2.1. The probability of bit 1 can be obtained by P(1) = w/m. The smaller P(1), the smaller the multi-user interference.

2.5.8/ UNARY CODE

In unary code, all codewords have weight 1. Most frequent symbols are mapped to codewords of smaller size, starting with size of 1 bit. Mapping table for unary code is shown in Table 2.1. A useful property is that all codewords end in bit 1, so the receiver knows that the following bits belong to next symbol.

2.6/ CONCLUSION

Nanotechnology enables the development of nanodevices, i.e., electronic devices with total dimension up to a few cubic micrometers, capable to perform simple task at micro scale. The development in nano-antennas show that One micrometer dipole CNT nano-antenna resonates at terahertz band (0.1-10 THz), which matches the operating frequency of graphene-based nano-transceiver. As a result, the operating frequency of nanonetworks is at terahertz band. Terahertz band has a very high molecular pathloss and very high molecular noise. Currently for simplicity reason, TS-OOK modulation is the only feasible modulation for nanocommunications. In TS-OOK modulation, bit 1 is presented as a pulse transmission and bit 0 as silence (no transmission). Hence, reducing the number of bits 1 yields energy efficiency. Low-weight codes can be used to reduce the number of bits 1 in bitstream, which is suitable for TS-OOK modulation.

ENERGY EFFICIENT CODES FOR NANONETWORKS

Due to limited battery capacity and circuit complexity, pulse-based modulation is currently the only modulation scheme for the electromagnetic communication among nanosensors. Jornet and Akyildiz [START_REF] Jornet | Femtosecond-long pulse-based modulation for terahertz band communication in nanonetworks[END_REF] proposed TS-OOK modulation in terahertz band, where a 100 femtosecond-long pulse is transmitted for bit 1, and silence for bit 0. Time between consecutive bits is fixed. The greatest energy consumption in the transmission process is the pulse transmission, since it activates nano-components, such as signal generator and filters for pulse shaping. Thus, it is clear that reducing the number of bits 1 yield energy efficiency.

In order to obtain energy efficiency, some codes require large bandwidth expansion, thus increasing transmission time. Also, some codes are more robust than others, since for some of them a 1-bit error leads to several erroneous bits at receiver, i.e., a higher error rate.

Data transmission in nanonetworks is in its infancy, and this study aims to foster the development of nanonetworks, especially internet of multimedia nano-things [START_REF] Jornet | The internet of multimedia nano-things[END_REF]. In this section, we compare the codes that can be used to reduce the number of bits 1 using several criteria appropriate to nanocommunications, such as energy efficiency, bandwidth expansion, and robustness against transmission errors, including a criterion relevant to multimedia, Peak Signal to Noise Ratio (PSNR). Moreover, we also propose two new codes and include them in code comparison. The comparison is done theoretically using a mathematically-generated input data, and numerically using an image file.

3.1/ NANONETWORK MINIMUM ENERGY (NME) CODE

Compression techniques are usually used to reduce the redundancy in the information. A classical compression technique is Huffman coding, where the most often used symbols are encoded with fewer bits [START_REF] Proakis | Communication Systems Engineering[END_REF]. Our proposed method is a variation of Huffman coding. In both algorithms, symbols are ordered according to their frequency in input data. However, whereas in original Huffman algorithm the more frequent symbols have fewer bits, in our method the more frequent symbols have the same number of bits, but fewer number of 1s.

There are many variations of Huffman code. Abrahams [6] gives a comprehensive list.

She considers fixed-to-variable, and variable-to-fixed source coding. Our method is fixedto-fixed. Input data can be infinite, can have lexicographic constraints (Hu-Tucker problem), the codeword length can have constraints, coding can have unequal cost code symbols (Karp problem). Our method is similar to the latter variant, Karp problem. Whereas in classical problems the cost of a symbol is the number of its bits, in Karp problem the cost of a symbol depends on its bit values, i.e., the cost of symbol i is c(0)M(i) + c(1)N(i), with M the number of bits 0 in symbol i, N the number of bits 1, and c(0) and c(1) 1.

3.1.1/ NME ALGORITHM

The purpose of Nanonetwork Minimum Energy coding is to reduce the energy usage for communication between nanosensors. It is a simple algorithm, suitable to the small power available in nanosensors. Data is transmitted from sender to receiver(s) as bits 0 and 1, and received as bits 0 and 1. The idea is to transmit the most often used blocks of bits with fewer 1s, in order to decrease the energy used to send the data. The algorithm for nanosensor networks is the following:

1. Segmentize the binary input sequence into blocks (symbols) of n bits.

2.

Create a table of used symbols and their frequency.

3.

Create another table by sorting the symbols in decreasing order of their occurrence level, and then encode more often used symbols with fewer 1s. Output symbols with the same weight are sorted in decreasing order of the largest distance between consecutive 1s in the output symbol.

If the order of the output symbols with the same weight is not taken into account, NME coding is the same as ME coding. For example, the available 4-bit symbols with 2 bits 1 are the following: 0011, 0101, 0110, 1001, 1010, 1100. ME coding orders them in ascending order, like previously written. Instead, NME orders them in descending order of the distance among the bits 1: 0101, 1001, 1010, 0110, 1100, 0011. Thus, more often used symbols are encoded with more spaces between 1s, which is more suitable to nanonetworks, as stated before.

Note that the output of NME algorithm has the same number of total bits as the input.

The only difference is the number of 1s, the output of NME algorithm having less number of 1s than the input.

In the following, we will detail the algorithm. In step 1, the binary input sequences are segmented into blocks of n bits, afterwards the binary sequence is converted into symbols of A = a 1 , a 2 , . . . , a N . A denotes the set of possible output from the random variable X. The probability mass function is denoted by P i = P(X = a i ) for i = 1, 2, ..., N (where N = 2 n ). In practice, not all the symbols are used in transmission process. In this case, the set of used symbols can be defined as A u = a 1 , a 2 , . . . , a M , where M ≤ N.

In step 2, the table of used symbols and their frequency (number of occurrences) is created, as shown in Table 3.1. This table allows to count the number of 1 bits. The total weight (the number of 1s) for original data is:

N original = M i=1 n(i) × w(a i ) (3.1) Symbol Frequency a i (1) n(1) a i (2) n(2) . . . . . . a i (M) n(M) Table 3.1: Step 2 in NME coding. Input symbols A i Frequency Output symbols A o a i (1) n(1) a o (1) a i (2) n(2) a o (2) . . . . . . . . . a i (M) n(M) a o (M) Table 3.2: Step 3 in NME coding.
where a i is the input symbols, n(i) the number of occurrences of symbol i, and w(a i ) is the Hamming weight of symbol i (the number of 1s in symbol i) [START_REF] Sklar | Digital Communications, Fundamentals and Applications[END_REF].

In step 3, a new table (the dictionary) is created from the previous table by sorting the symbols based on their frequency of occurrence, as shown in Table 3.2. More often used symbols appear upper in this table, i.e. n(i) ≥ n( j) for i < j. The dictionary is created before the transmission and it does not change afterwards. The total weight of NME output is:

N N ME = M i=0 n(i).w(a o (i)) (3.2)
where a o is the output symbols (codewords). It has four symbols of 2 bits each, both in input and output.

3.1.2/ NME PROPERTIES

3.1.2.2/ NUMBER OF MAPPINGS COMPUTING

Theorem. The number of possible n-bit mappings is 2 n !.

Examples. There are 2! = 2 possible 1-bit mappings, 4! = 24 possible 2-bit mappings, and 8! = 40320 possible 3-bit mappings.

Proof. An n-bit mapping is on the form: The mappings are generated by the various arrangements of the N symbols, which yields P N = N! possible mappings. Looking at the number of lines, N is the total number of symbols of n bits, so N = 2 n . So the number of n-bit mappings is N! = 2 n !. This 2n-bit mapping transforms each symbol of 2n bits in the same manner as the original n-bit mapping. So this 2n-bit mapping is identical to the original n-bit mapping. (Two mappings are identical if the encoded text is the same, except perhaps the last bits of the text.) This means that any n-bit mapping can be written as a 2n-bit mapping. Q.e.d.

3.1.2.4/ COMPARISON BETWEEN THE BEST n-BIT MAPPING AND THE BEST n + 1-BIT MAPPING

An n-bit mapping could be better or worse than an n + 1-bit mapping. Such examples are provided later, in result section (3.1.3), for example, in Table 3.5, NME 2-bit has a greater energy efficiency than 3-bit, whereas in Table 3.6 it is the contrary.

3.1.2.5/ DICTIONARY LENGTH

In general case, the dictionary (coding table) too should be transmitted to receiver, before the data. So the dictionary length is an important parameter to consider. However, as the data size increases, the dictionary length becomes less and less important compared to data.

The biggest dictionary for an n-bit mapping contains all the possible n-bit symbols, i.e.

2 n symbols. Each symbol has n bits. Therefore, the dictionary contains n2 n bits for input, and n2 n bits for output, which gives 2n2 n bits. However, the dictionary can be sorted by the output symbols, so that only the input be transmitted. So the Maximum Dictionary Length is MDL = n2 n .

In practice, not all the 2 n symbols are found in the data, but only M, with M ≤ 2 n . In this case, the Used Dictionary Length is UDL = Mn.

3.1.3/ ENERGY EFFICIENCY IN NME

The goal of NME code is to obtain energy efficiency. We first generate random binary sequences of 10,000 bits with various frequencies of bit 1. Using equation (3.7), the energy efficiency of NME on data alone (when dictionary is known by receiver) is shown in Figure 3.1. The main result of the figure is that for a fixed input sequence size, the greater n, the greater the improvement, as expected. Also, when the input sequence has only 0 bits, the output is also all 0, so there is no coding improvement (0%); as the probability of 1 increases, the symbols with larger weight occur more often, and the coding improvement increases.

In order to evaluate NME, we do tests with several representative types of files: compressed video/image files have very few redundancy (this is the purpose of compression), so the number of bits 0 and 1 is about 50% each; a program file has many bytes 0.

The particular files used in each category (news cif, bus qcif etc.) were chosen at random, without any specific reason. The following results present the energy used to send the data (the number of 1s in the output of NME), the dictionary (the number of 1s in dictionary) and their sum. The energy efficiency for NME coding is measured using equation (3.7).

Compressed video: news cif.mp4. Transmitted bits: 7,692,136 bits = 0.92 MB. The number of 1s for original is 3,763,743 bits. The NME performance is shown in Table 3 number of 1s for original is 5,607,698 bits. The NME performance is shown in Table 3.4. NME gains in all cases, and the largest improvement is achieved using NME 16 bit with 53.81% energy efficiency.

Uncompressed image: lena.bmp. Transmitted bits: 532,912 bits = 65.1 kB. The number of 1s for original is 260,762 bits. The NME performance is shown in Table 3.5. The largest improvement is achieved using NME 8 bit with 23.56% energy efficiency.

Program file: AdobeUpdater.dll. Transmitted bits: 4,019,712 bits = 0.49 MB. The number of 1s for original is 1,680,819 bits. The NME performance is shown in Table 3.7. NME gains in all cases, and the largest improvement is achieved using NME 16 bit with 38.54% energy efficiency.

3.2/ THEORETICAL COMPARISON OF LOW-WEIGHT CODES

As discussed in Chapter 2, there are several low-weight codes for TS-OOK modulation. In this section, we compare the codes performance in terms of energy efficiency, bandwidth expansion, information rate, interference reduction, sequential bits 1, and robustness against transmission error. We start by defining the input data stream used.

The transmitted information should have some uncertainty in it (otherwise there is no interest to transmit it), therefore data transmission is usually modeled as a random process. In our model, bits 1 in binary sequences are randomly generated using Bernoulli distribution with probability P(X = 1) = p. For each probability of bit 1 (more precisely p = 0, 0.1, 0.2, 0.3, . . . , 1), we generate 10 6 random bits.

Next, the binary stream is divided into symbols of n bits, giving set A = {a 1 , a 2 , . . . , a M }, with M = 2 n . The probability of a symbol to have weight k can be computed using binomial distribution as follows:

P(w = k) = n k p k (1 -p) n-k (3.3) n k = n! (n -k)! k! (3.4)
If symbols with the same weight occur with the same probability, then probability of i-th symbol can be obtained using:

P(A = a i ) = P(w i =k) n k , 1 ≤ i ≤ M (3.5)
where n k stands for the number of symbols with weight k. When source transmits L symbols, the occurrence frequency of each symbol is:

N i = P(A = a i ) L, 1 ≤ i ≤ M (3.6)
For codes using source statistics, such as ME, NME and unary, encoder sorts the symbols in decreasing order of their occurrence frequency, yielding a new set

B = {b 1 , b 2 , . . . , b M }, where N b 1 ≥ N b 2 ≥ . . . ≥ N b M .
In order to generate results, we use Matlab.

3.2.1/ ENERGY EFFICIENCY

Energy efficiency measures the effectiveness of code in reducing the number of bits 1 from input. We defined energy efficiency as the percentage of energy that can be saved from uncoded/input, as follows:

ξ = n i -n c n i × 100% (3.7)
where n i is the number of bits 1 in input data, and n c the number of bits 1 in data transmitted. Codes with larger average value of energy efficiency are better. Sometimes n c could be greater than n i , which results in negative energy efficiency; this means that the code gives worse results than without coding.

Reducing energy for transmission in nanonetworks is useful. For example, novel nanoscale energy harvesting systems [START_REF] Gammaitoni | Nonlinear oscillators for vibration energy harvesting[END_REF][START_REF] Wang | Towards self-powered nanosystems: From nanogenerators to nanopiezotronics[END_REF] enable nano-machine to convert vibrational, fluidic, electromagnetic or acoustic energy into electrical energy. Nano-machine can even achieve perpetual operation when harvested energy is larger than the consumed one [START_REF] Wang | Energy and spectrum-aware MAC protocol for perpetual wireless nanosensor networks in the Terahertz band[END_REF]. A reduced energy consumption would allow a smaller inter-symbol time (time between consecutive bits), hence a greater transmission speed. In the case where nano-batteries are used, a reduced energy would naturally allow a longer battery lifetime.

Finally, note that coding is a very low energy consuming process. Low-weight codes simply map the input to corresponding codeword, which requires sufficiently small energy to be implemented in nano-processors based on nano-transistor [START_REF] Lemme | Current status of graphene transistors[END_REF] and nano-memory [START_REF] Bennewitz | Atomic scale memory at a silicon surface[END_REF] in nanomachine.

Energy efficiency denotes the code ability to reduce the number of bits 1 from input stream. The more the reduction of number of bits 1, the larger the energy reduction.

In the following, we present the number of bits 1 generated by each method, we define a formula to compute the efficiency, and finally we show the performance of each method in a graph.

In order to give a hypothetical example, by using the data in The number of bits 1 generated by each method is the following:

1. In ME and NME codes, codewords are sorted in increasing number of bits 1 as follows:

w(c i ) =          0, i = 1 j, K( j -1) < i ≤ K( j) n, i = 2 n (3.8)
where w(c i ) is the i-th codeword with weight j, and K( j) is the cumulative number of combinations of x bits 1:

K( j) = j x=0 n x , j = 1, . . . , 2 n -1 (3.9)

2.

In PG and NPG codes, codewords have only weight 0 or 1, as follows:

w(c i ) = 0, i = 1 1, 2 ≤ i ≤ 2 n (3.10)

3.

In MTE code, codewords have weight 0, 1 or 2, cf. (2.33).

4.

In MEC code, codewords have weight 0, d min /2 or d min :

w(c i ) =          0, i = 1, P max > 0.5 d min , 2 ≤ i ≤ 2 n , P max > 0.5 d min /2, P max < 0.5 (3.11)
For MEC, we choose d min = 4 in order to provide the code with error correction capability, have a good energy efficiency and maintain bandwidth expansion low. When d min = 4, M = 8 and m min = 16, the mapping table is as shown in Table 2.1.

5.

In LWC code, codewords have constant weight w, as follows:

w(c i ) = w, 0 ≤ i ≤ 2 n (3.12)
For LWC, we choose codeword weight w = 2, because if w = 1 it behaves like PG, and if w > 2 the efficiency decreases.

6.

In unary code, codewords have constant weight 1, as follows:

w(c i ) = 1, 0 ≤ i ≤ 2 n (3.13)
Since low-weight codes map each symbol into a codeword, the energy efficiency can be obtained by counting the reduction of bits 1 of a symbol compared to its codeword, as follows:

ξ i = N i (w(x|x = a i , b i ) -w(c i )) N i (w(x|x = a i , b i )) (3.14)
where w(x|x = a 1 , b i ) is the weight of i-th symbol (a i from set A for codes without statistics, or b i from set B for codes with source statistics), and w(c i ) is the weight of i-th codeword.

The energy efficiency for the input stream is then:

ξ = M i=1 ξ i (3.15)
Energy efficiency for all codes for various probabilities of bit 1 when input symbol size of 4 bits is shown in Fig. 3.2. NPG yields the best result for all probabilities of bits 1. MEC, LWC and unary even produce negative energy efficiency (i.e., require more energy than uncoded transmission).

3.2.2/ BANDWIDTH EXPANSION

Some low-weight codes reduce the number of bits 1 by increasing the number of transmitted bits, i.e., reducing the number of bits 1 by increasing the number of bits 0. The bandwidth expansion is defined as the ratio between total number of bits in output data and total number of bits in input data, i.e., bandwidth expansion b E means transmitting b E × A bits for A input bits.

Bandwidth expansion has some effects: reduce the information rate and increase the power consumption at transmitter and receiver. The information rate is reduced proportionally to bandwidth expansion, e.g., if the transmission rate is r Mbps, then information rate becomes r/b E Mbps. Also, a larger output size makes a longer transmission, hence both transmitter and receiver stay active for longer time. Thus, code with lower bandwidth expansion is better.

In ME and NME, n bits input is mapped to n bits output, so there is no expansion in bandwidth. In PG and NPG, n bits input is mapped to codeword with output size m PG = 2 n -1 bits. In MTE, n bits are mapped to codewords with maximum weight 2 (with sequential bits 1). The total number of codewords are 1 (codeword weight 0) + m (codewords weight 1) + (m -1) (codewords weight 2). Therefore, output size of MTE is

1 + m + (m -1) ≥ 2 n (3.16) thus m MT E ≥ 2 n-1 (3.17)
For LWC, output size must fulfill (2.35). For constant weight w = 2, LWC output size is

m(m -1) ≥ 2 n+1 (3.18) If m is very large then m(m -1) ≈ m 2 , therefore m LWC ≥ 2 n+1 2 (3.19)
In unary code, output size varies from 1 to 2 n bits. The average output size for unary is

mUNARY = 2 n i=1 i 2 n = 2 n-1 + 1 2 (3.20)
The smaller the bandwidth expansion, the better the code. Tab. 3.9 and graphically Fig. 3.3 confirm this idea. It shows that ME and NME (followed by LWC) codes have the smallest bandwidth expansion, since input symbol size equals codeword size. It also shows that MEC code has the largest bandwidth expansion; the reason is that MEC code requires large codeword size to maintain the minimum distance, needed to have error correction.

3.2.3/ INFORMATION RATE AFTER CODING

Information rate is useful because it takes into account the terahertz band properties. Information rate after coding in bit per second using TS-OOK modulation can be computed as follows [START_REF] Jornet | Femtosecond-long pulse-based modulation for terahertz band communication in nanonetworks[END_REF]:

Coding Bandwidth expansion NME, ME 1 NPG, PG (2 n -1)/n MTE 2 n-1 /n MEC d min 2 n-1 /n LWC 2 n+1 2 /n Unary (2 n-1 + 1 2 )/n
Table 3.9: Bandwidth expansion, in theory.

IR c = IR / b E (3.21)
where IR is the information rate given by eq.( 2.20) and b E the bandwidth expansion.

Codes with larger bandwidth expansion yield smaller information rate after coding.

By using probability of transmitting bit 1 P pulse and bandwidth expansion from Table 3.9, information rate after coding for all codes is shown if Fig. 3.4. It shows that uncoded has the largest information rate since it has the largest entropy, while MEC the lowest one.

3.2.4/ MULTI-USER INTERFERENCE

Networking nanodevices allows to increase their transmission range. A high density of nanosensors is necessary to increase the transmission rate [START_REF] Jornet | Information capacity of pulse-based wireless nanosensor networks[END_REF]. Uncoordinated pulse transmission in TS-OOK modulation can lead to interference (collision) between transmitted symbols [START_REF] Jornet | Femtosecond-long pulse-based modulation for terahertz band communication in nanonetworks[END_REF]. Interference appears when a receiver receives pulses from several transmitters in the same time. The interference power at the receiver from J nanosensors in radius a is denoted by:

I a = J j=1 P(d j ) ≈ β d -α (3.22)
where d is the distance, P(d) the received power from nanosensor with distance d from receiver, and α and β are constants which depend on pulse and channel properties. For example, when pulse energy is 0.1 aJ and the channel consists of 10% water vapor molecules, α ≈ 2.1 and β ≈ 1.39 × 10 -18 .

The interference distribution can be described by its power spectral density. When spatial distribution of nanosensors is modeled with Poisson distribution and the probability of incoming pulses is distributed uniformly, the power spectral density of interference in nanonetworks can be computed using [START_REF] Jornet | Low-weight error-prevention codes for electromagnetic nanoneworks in the terahertz band[END_REF]:

f I (i) = 1 πi ∞ k=1        Γ(2k/α + 1) k! 2π β λ p 1 T s Γ(1 -2/α) T p i (2/α) k × sin (kπ(1 -2/α))        (3.23)
where Γ(x) is the gamma function, p 1 the probability of bit 1 (probability of transmitting pulse), λ the node density in nodes/m 2 , T s the interval between pulses, and T p the pulse duration.

Interference in nanonetworks are influenced by probability of transmitting pulse, which depends on the number of transmitted pulses compared to the number of transmitted bits:

P pulse = N pulse N bits (3.24)
The number of transmitted bits is:

N bits = 2 n i=1 N i m i (3.25)
where n is the input symbol size (n bits symbol), N i the frequency (number of occurrences) of i-th symbol, as given by (3.6), and m i the size of i-th codeword. The number of transmitted pulses, i.e., the number of bits 1 transmitted, is:

N pulse = 2 n i=1 N i w(c i ) (3.26)
where w(c i ) is the weight of i-th codeword.

By taking the average value of P pulse for all probabilities of bit 1 (from 0 to 1), m i for each code using value in Tab. 3.9, and input size n = 4, interference for all codes is shown in Fig. 3.5. It shows that the best one is MEC, while uncoded has the biggest interference.

3.2.5/ SEQUENTIAL BITS 1

In terahertz band, molecules absorb the energy portion of incoming electromagnetic wave and re-radiate it. Re-radiated signal from molecules in the channel is considered as molecular absorption noise [START_REF] Jornet | Channel capacity of electromagnetic nanonetworks in the terahertz band[END_REF]. This kind of noise only appears when channel is excited with pulses. Channel relaxation is related to the required time for the molecules to fully release the absorbed energy. By reducing the number of sequential 1s, molecules in the channel will have more time to waste the absorbed previous pulse energy. Hence, codes with lower number of sequential bits 1 are better. Sequential bits 1 occur in one of the following conditions:

• Codeword weight is greater than or equal to 2, then the codeword may contain a sequential bits 1.

• Subsequent codewords, where the first codeword ends in bit 1 and the second codeword starts with bit 1.

As shown in Table 2.1, this occurs in PG when the first codeword follows the (2 n -1)-th codeword. In NPG this occurs when the second codeword follows the 2 n -th codeword. In MTE, this occurs when first codeword follows the (n+1)-th codeword, and also for (n+2)-th to (2 n -1)-th codewords. In unary, this occurs only when first codeword occurs after other codewords. To sum up, it appears seldom in PG, NPG and unary, and frequently in MTE.

3.2.6/ ROBUSTNESS AGAINST TRANSMISSION ERRORS

Transmission in terahertz band is mainly affected by path loss (spreading loss and molecular absorption) and molecular absorption noise [START_REF] Jornet | Channel capacity of electromagnetic nanonetworks in the terahertz band[END_REF]. Additional channel effects, such as multi-path and nano-particle scattering [START_REF] Jornet | Channel modeling and capacity analysis for electromagnetic wireless nanonetworks in the terahertz band[END_REF], further distort received pulses. As a result, the receiver can receive erroneous bits. In order to measure the codes performance in robustness against transmission errors we use codeword error probability (CEP) and peak signal to noise ratio (PSNR) for image quality.

3.2.6.1/ CODEWORD ERROR PROBABILITY

The BEP for low-weight code with no error correction capability can be computed using probability of transmitting bit 1 P pulse in (3.24) and noise power in (2.28) and (2.29). Since MEC has the capability to correct errors, the bit error probability computation is different from others. The BEP of MEC is as follows [START_REF] Sklar | Digital Communications, Fundamentals and Applications[END_REF]:

P MEC e = m i=t+1 m i P i e (1 -P e ) m-i (3.27)
where m is the codeword size, P e the BEP given by eq. (2.21) and t the number of corrected bits, where t = (d min -1)/2.

BEP is computed using eq. (2.21) and CEP using eq. (2.32). BEP for all codes with is shown in Fig. 3.6 and CEP in Fig. 3.7. It shows that MEC has the best performance in robustness (BEP and CER) against transmission error, since it has the capability to correct errors.

3.2.6.2/ RECEIVED IMAGE QUALITY

Errors during data transmission affect the decoding process at the receiver, which decodes the received codeword into another codeword. A 1-bit error yields a different codeword, which is decoded as another, completely different symbol. As such, a 1-bit transmission error generally becomes a 1-symbol-length error. The error can lead to an existent (but wrong) input symbol, or into an inexistent (not in the codebook) symbol, in which case receiver can decode it into symbol 0.

More severely, in codes using variable-length codeword (unary), a 1-bit transmission error can lead to one symbol being interpreted as several symbols, and vice versa. For example, looking at unary code in Table 2.1, when the sender sends twice the symbol 0001 (corresponding to input symbol 100) and the middle 1 is incorrectly received as 0 because of transmission error, the received data becomes 00000001, which is decoded as one symbol (000).

The receiver can reconstruct the transmitted image from the received bitstream. Since transmission channel introduces errors, the received bitstream may contain errors, which and the mean square error (MSE) is:

E ms = 1 AB A-1 x=0 B-1 y=0 e(x, y) 2 (3.29)
where A and B are the image resolution on horizontal and vertical axis. Then PSNR is:

PS NR(dB) = 10 log 10 Q 2 E ms (3. 30
)
where Q is the larger value in pixel, e.g., Q = 255 in image with 8 bit-per-pixel (bpp). The larger the PSNR value, the better the received image (closer to sent image) [START_REF] Shi | Image and Video Compression for Multimedia Engineering, Fundamentals, Algorithms, and Standards[END_REF].

Structural Similarity (SSIM)

The structural similarity (SSIM) measures the similarity between two images. SSIM is more consistent with human visual perception than PSNR.

The SSIM can be computed as follows [START_REF] Wang | Image quality assessment: from error visibility to structural similarity[END_REF]: The range value of SSIM is from 0 to 1. An SSIM equal to 1 means that the transmitted image and the received image are the same (no transmission error).

S S I M(Ii, Io) = (2 µ Ii µ Io + c 1 )(2 σ Ii,Io + c 2 ) (µ 2 Ii + µ 2 Io + c 1 )(σ 2 Ii + σ 2 Io + c 2 ) (3.31)

3.3/ NUMERICAL COMPARISON OF LOW-WEIGHT CODES

We recall that one of the applications of internet of nano-things is video transmission using nano-cameras. In this section, we present numerical results, obtained with MATLAB, when transmitting a file. The file to send is the real image of a cancer cell obtained by an electron microscope, as one of the applications of nanonetworks is medical field. The image is a grayscale image of type bmp and has 256 × 256 pixels.

3.3.1/ ENERGY EFFICIENCY

In order to investigate the performance of NME code and other codes in energy efficiency, we use cancer image for low-weight codes.

The cancer image has 532,912 bits, and contains 296,399 bits 1 (probability of bit 1 is 0.57). Energy efficiency for all codes is shown in Fig. 3.8. NPG code has the highest average energy efficiency, followed by PG and unary. MEC and LWC codes have negative energy efficiency for 2-bit input size; this is because in the coding table the codeword weight is 2, and the input symbol size is 2 bits (so the weight between 0 and 2, hence equal or smaller than codeword weight).

3.3.2/ BANDWIDTH EXPANSION

The numerical results for low-weight codes comparison has the same results as theoretical.

3.3.3/ INFORMATION RATE AFTER CODING

Information rate after coding, computed using (2.12), for cancer file is shown in Fig. 3.9. It shows similar results and exactly the same trend as Fig. 3.4 (page 40) in theoretical results section. The large value of bandwidth expansion in MEC greatly reduces its information rate.

3.3.4/ MULTI-USER INTERFERENCE

Probability density function of muti-user interference can be obtained using eq. (3.23). We use parameters: T s /T p = 1000, and node density λ = 0.1 nodes/m 2 . Code performance in multi-user interference is shown in Fig. 3.10. NPG code has the lowest interference, since it transmits a large amount of data with very small probability of bit 1. NME and ME codes reduce interference power around 1/2 (-4 dB, from -147.5 dbW to -150 dbW), while PG code reduces around 1/10 interference power (-13 dB) compared to uncoded transmission.

The result in Cancer is slightly different than in theoretical case; for example, in Cancer, NPG outperforms MEC in interference, while in theoretical vice versa. This is because in a practical application a symbol with P max > 0.5 rarely occurs; for example, the maximum symbol occurrence for cancer file is P max = 0.011. As such, there is no codeword with weight 0 and the probability of bit 1 is P 1 = 0.13. In theoretical case, the code could sometimes use the codeword with weight 0 (for the most frequent symbol), and as a result the probability of bit 1 is P 1 = 0.063, which is obtained by taking the average value of all probabilities of bit 1.

3.3.5/ SEQUENTIAL BITS 1

The fewer sequential bits 1, the better, due to channel relaxation in terahertz band. Fig. 3.11 shows the code performance according to the number of sequential bits 1. PG and NPG codes have the fewest sequential bits 1, because the codeword weight of PG and PNG are 1, and most of its codeword has bit 1 in the middle of codeword.

3.3.6/ ROBUSTNESS AGAINST TRANSMISSION ERRORS

Like in theoretical part, we measure CEP and received image quality. For that, we use the following parameters: the TS-OOK pulse energy E p = 1 fJ and distance between transmitter and receiver is 25 cm. Using eq. (2.28) and (2.29), the transitional probabilities at distance 25 cm are P(Y = 1|X = 0) = 9.1 × 10 -7 and P(Y = 0|X = 1) = 5.8 × 10 -3 .

3.3.6.1/ CODEWORD ERROR PROBABILITY

The file transmission gives similar results to the theoretical results shown in Fig. 3.6 and 3.7.

3.3.6.2/ RECEIVED IMAGE QUALITY

The larger value of the PSNR and the SSIM, the higher the quality of the received image. Fig. 3.12 shows the code performance using PSNR. The best results are given by MEC, followed by Uncoded. Codes with variable codeword lengths (unary) give the worst results. First, in image transmission, erroneous received codewords appear as erroneous pixels, and we recall that a 1-bit transmission error generally becomes a 1-symbol-length error. Moreover, for unary codes, in case of transmission errors and due to variablelength codeword, 1 sent symbol can be received as 2 or several symbols, and vice versa, as written in the previous section.

The SSIM of the received cancer image is shown in Fig. 3.13. The results show that MEC has a better performance in robustness against transmission errors, since it has the capability to correct errors.

This can be easily seen in Fig. 3.14, which presents the reconstructed image at receiver. Images received using unary code are so distorted that they are unrecognisable; these codes are drastically vulnerable to transmission errors and require error correction code.

SUMMARY RESULTS

If we compare these results with conclusions from theoretical results (Sec. 3.2), metric by metric, we notice that they are similar in almost all cases. For example, in both theory and cancer file, for energy efficiency the best code is NPG and the worst is uncoded, and for bandwidth expansion ME and NME are the best and MEC is the worst. For multi-user interference, the small difference is due to difference in probability of the most frequent symbol (P max ) in theoretical example and cancer file.

Code performance for both theory and cancer file is summarized in Table 3.10. Three codes have good results in almost all the cases: PG/NPG and unary. PG/NPG are very bad in bandwidth expansion, whereas unary is very bad in robustness. All codes (except MEC and LWC for input size equal to 2) have positive energy efficiency; this is not surprising, since we mainly evaluated low-weight codes.

3.4/ CONCLUSIONS

We compared various low-weight codes, and two novel one we propose NME and NPG, a small variation of PG using several criteria specific to nanonetworks, namely energy ef- ficiency, bandwidth expansion, information rate, multi-user interference, sequential bits 1, and robustness. The results show that, even if there is no clear winner, NPG and PG have very good performance compared to the others for all criteria used, except in bandwidth expansion.

SIMPLE IMAGE COMPRESSION FOR NANONETWORKS

The integration of low-power wireless networking technology and multimedia microelectronics fosters the development of wireless multimedia sensor networks (WMSN) [START_REF] Akyildiz | A survey on wireless multimedia sensor networks[END_REF].

A node in WMSN has sensing, processing and communication capability to send the information to an end system. In macro scale, WMSN have applications as varied as artificial retina, battlefield surveillance, movement monitoring, volcano monitoring, tsunami or early flood detection [START_REF] Akyildiz | Wireless Sensor Networks[END_REF]. While in micro scale, wireless multimedia nano-sensor networks (WMNSN) allow nano-devices to detect the presence of virus, harmful bacteria and cancer cell in human body [START_REF] Jornet | The internet of multimedia nano-things[END_REF].

Whether in macro or micro, a node in WMSN has limited resources in transmission range and energy capacity. The main research challenge in WMSN is energy efficiency to prolong node lifetime, due to limited battery capacity and difficulty to replace or recharge the battery. In general, communication process in wireless sensor node consumes more energy than sensing and computational processes. The energy consumption in communication can be minimized through coding, which requires additional data processing, e.g., data compression. It is important for additional process to consume less than the energy saving in communication. Moreover, it is essential to reduce the energy consumption whether in computation or in communications process.

Several authors noted that in macro scale (wireless sensor networks) energy consumption for transmission (of one bit) is considerably larger than computation (execution of one instruction) [START_REF] Pottie | Wireless integrated network sensors[END_REF][START_REF] Akyildiz | Wireless Sensor Networks[END_REF][START_REF] Belleville | Energy Autonomous Micro and Nano Systems[END_REF][START_REF] Karl | Protocols and Architectures for Wireless Sensor Networks[END_REF]. Following paragraphs confirm this.

In [START_REF] Pottie | Wireless integrated network sensors[END_REF], the energy cost to execute 3 million instructions is considered as 3 J, so the computation consumes 1 µJ/instruction. More recent results show that for computation, conventional microprocessor consumes 1 nJ/instruction, low-energy digital signal processing (DSP) consumes 0.01 nJ/instruction and hardwired logic consumes 0.001 nJ/instruction [START_REF] Belleville | Energy Autonomous Micro and Nano Systems[END_REF].

As for transmission in macro scale, in [START_REF] Pottie | Wireless integrated network sensors[END_REF], the transmission of a 1 kbit packet over a distance of 1 km using BPSK modulation consumes energy 3 J, which is equal for executing 3 million instructions. Hence, the ratio between transmission and computation is 1:3000. In Ultra-Wide Band (UWB) image transmission system using On-Off Keying (OOK) modulation, radio transmission component consumes P = 15 mW with rate R = 1.3 Mbps for distance of 4 m [START_REF] Chen | A 64 x 64 pixels UWB wireless temporal-difference digital image sensor[END_REF]. So, the energy consumption is E = P/R = 11.5 nJ/pulse, which is three orders of magnitude greater than required energy to execute 1 instruction in low-energy DSP. In built-in systems, the ratio of the energy consumption to send one bit compared 51 to computing a single instruction is between 1500 to 2700 for Rockwell WINS nodes and between 220 to 2900 for MEDUSA II nodes [START_REF] Karl | Protocols and Architectures for Wireless Sensor Networks[END_REF].

In micro scale (nanonetworks), computation energy in nano-devices remains unknown, since nano-processor using graphene-based nano-transistor is still under development [START_REF] Lemme | Current status of graphene transistors[END_REF]. The pulse energy in nanocommunications depends on the targeted distance between transmitter and receiver. As discussed in previous Chapter, electromagnetic nanocommunications use TS-OOK modulation with pulse energy 1 fJ. The initial prediction for computation energy in nano-devices has been reported in [START_REF] Akkari | Joint physical and link layer error control analysis for nanonetworks in the terahertz band[END_REF], which is 0.1 aJ per instruction. So, in micro scale too, the transmission energy is larger than computation energy.

The previous numbers consider only the transceiver part. However energy consumption for transmission should also include the process where central processing unit (CPU) reads the bit-stream in memory and gives instructions to signal generator for transmission process, so this process further increases the transmission energy. Moreover, for large transmission distance (e.g. more than 100 meters), transmitter requires power amplifier which consumes much energy. Additionally, since nodes in WSN have short transmission range due to the use of low power transmitter, end-to-end transmission is performed in multi-hop fashion. Therefore, total energy consumption for transmission is equal to the sum of transmission energy in each hop from source node to end system. So the transmission energy is even greater. Based on all this information, we conclude that communication consumes much more energy than computation. These results motivate the use of compression method before transmission process.

Now we turn our focus on the networks where the compression method can be implemented. Our particular pulse-based communication networks are TeraNets (ultrabroadband communication networks at terahertz band) and nanocommunications. Both TeraNets and nanocommunications will operate at THz band, which allows transmission rate up to several Tbps [START_REF] Jornet | Channel modeling and capacity analysis for electromagnetic wireless nanonetworks in the terahertz band[END_REF].

In pulse-based communication and THz band communication, communications can be classified according to the size of devices (scale) as shown in Fig. 4.1. In micro world, devices have total dimension of several square micro-meter and transmission range is below 1 m [START_REF] Jornet | Femtosecond-long pulse-based modulation for terahertz band communication in nanonetworks[END_REF]. In macro world, devices are larger and transmission range is up to 10 m [START_REF] Akyildiz | Terahertz band: Next frontier for wireless communications[END_REF].

We propose simple and energy efficient image compression (SEIC) for pulse-based communication systems at THz band. The proposed method can be used in micro and macro scale. SEIC compression is based on transform coding, i.e., discrete cosine transform (DCT) and discrete wavelet transform (DWT), followed by low-weight code.

Compressing an image inevitably consumes energy, hence it is important to compare the energy to transmit an uncompressed image and the energy to compress it and to send the compressed file. As it will be shown later, the energy in uncompressed case is much higher than in compressed case, hence it is better to compress it before transmission.

Simulation results show that the proposed method can obtain an energy efficiency greater than 88 % and outperforms classical JPEG, JPEG 2000, GIF and PNG in terms of energy efficiency and robustness against transmission error. Our main contributions are:

• We propose two image compressions based on DCT and DWT transform followed by NME code, which are simple, energy-efficient and take into account robustness against transmission error.

• We compare our proposed method with several existing well known image compression methods such as JPEG, JPEG 2000 and PNG.

• We show that our compression method is useful in WMSN and WMNSN.

4.1/ SIMPLE AND ENERGY EFFICIENT IMAGE COMPRESSION (SEIC)

Since a node in WSNs has limitated energy capacity, both energy for computation and communication need to be minimized. The data compression method needs to be simple. In [START_REF] Marcelloni | Simple algorithm for data compression in wireless sensor networks[END_REF], the authors proposed simple data compression for WSN. The method maps the differences of the values between consecutive samples to variable codeword size (output length). The larger the difference, the longer the codeword size. For example, if the difference is ±1 the codeword is 010, and if the difference is ±8192 the codeword is 111111111110. The results show that their method outperforms S-LZW, GZIP and BZIP2 in terms of energy efficiency, needs less computation and has a lower memory footprint. However, the drawback of this method is unreliability. The difference value (whether current sample/data is larger of smaller than previous one) is coded with the same codeword, which may lead to estimation error at receiver. The error is propagated even in the absence of transmission error, so perfect reconstruction is almost impossible. In addition, variable codeword sizes require more computational complexity than the constant one. Moreover, the number of bits 1 is very large especially in long codewords. Therefore, we conclude that this method is unsuitable in nanocommunications.

In classical WSN, image compression is required to reduce the number of transmission due to the limited bandwidth and limited-battery capacity in sensor devices [START_REF] Akyildiz | Wireless Sensor Networks[END_REF]. Image compression can be classified as lossless and lossy. In general, lossy compression yields higher compression ratio than lossless [START_REF] Hwang | Multimedia Networking: from theory to practice[END_REF]. Lossless image compression such as PNG takes the advantages of non-uniform probability distribution for a variable-length codewords. PNG uses deflate code, which is a variant of Lempel-Ziv.

Joint Picture Expert Group (JPEG) and JPEG 2000 are the most popular lossy image compressions. JPEG is based on discrete cosine transform (DCT) transform, while JPEG 2000 on discrete wavelet transform (DWT). The results given in [START_REF] Ghorbel | DCT & DWT images compression algorithms in wireless sensor networks: comparative study and performance analysis[END_REF] show that DWT outperforms DCT in terms of image quality, execution time and transmission robustness, while DCT outperform DWT only in memory usage. Alternatively, memory usage in DWT can be reduced by using block processing like in JPEG [START_REF] Angelopoulou | A comparison of 2-d discrete wavelet transform computation schedules on fpgas[END_REF].

Recently, several energy efficient codes for nanonetworks have been proposed. In [START_REF] Huang | Energy-efficient coding for electromagnetic nanonetworks in the terahertz band[END_REF], the authors investigate the energy efficient code for TS-OOK modulation by taking into account the energy consumption at the receiver. In [START_REF] Zainuddin | Low-weight code comparison for electromagnetic wireless nanocommunications[END_REF], we compare the performance of several low-weight codes for nanonetworks in terms of energy efficiency, bandwidth expansion, channel capacity, interference reduction and transmission robustness against error.

Our new methods are based on either DCT or DWT transforms followed by a low-weight code. In SEIC-DCT, the DCT coefficient is quantized with certain value to obtain large energy efficiency and good visual quality. SEIC-DWT uses only the coarse coefficients, i.e., only 1 sub-band from the 4 sub-bands in original DWT. The use of a fixed codeword size in low-weight code simplifies the symbol detection in decompression process compared to a variable-length codeword.

4.1.1/ SEIC DISCRETE COSINE TRANSFORM (SEIC-DCT)

The key to obtain high compression ratio is to decorrelate the pixels. Fourier transform (FT) is a well known method which transforms signal from time domain to frequency domain and vice versa. In image processing, FT represents an image as a sum of complex exponentials of varying magnitudes, frequencies and phases [START_REF] Mathworks | Image Processing Toolbox: For use with Matlab[END_REF]. Computation using computer requires discrete sample for computation of FT, i.e., Discrete Fourier Transform (DFT). Discrete Cosine Transform (DCT) uses the real part of DFT, which makes the computation more efficient. DCT has a useful property: most of the visually significant information about the image is concentrated in just a few coefficients of the DCT [START_REF] Thyagarajan | Still image and video compression with Matlab[END_REF]. For this reason, DCT is often used in image compression applications. The two-dimensional DCT of an image A with resolution N × N pixels is defined as follows [START_REF] Mathworks | Image Processing Toolbox: For use with Matlab[END_REF]:

X(i, j) = α N-1 m=0 N-1 n=0 A(i, j) cos (2m + 1)πi 2N cos (2n + 1)π j 2N , 0 ≤ i ≤ M -1, 0 ≤ j ≤ N -1 (4.1)
where

α = 1 N , for i, j = 0 2 N , for 0 ≤ i, j ≤ N -1 (4.2)
The reconstructed image B can be obtained using DCT inverse of DCT coefficient X, as follows:

B(i, j) = α N-1 m=0 N-1 n=0 X(i, j) cos (2m + 1)πi 2N cos (2n + 1)π j 2N , 0 ≤ i ≤ M -1, 0 ≤ j ≤ N -1 (4.3)
Compression in DCT transform is obtained by quantization process, where the DCT coefficients are quantized with uniform or non-uniform quantization level Q l . The larger the quantization value Q l , the larger the energy efficiency can be obtained. As the energy efficiency is getting larger, the visual quality is getting worse. Then, it is important to maintain an appropriate trade-off between energy efficiency and visual quality.

SEIC-DCT algorithm

At the sender, SEIC consists of three steps:

1. Perform the 8 x 8 blocks DCT transform for input image.

2.

Quantize the coefficients and convert them to binary stream.

3.

Reduce the number of bits 1 in binary stream by a low-weight code.

At receiver, the reconstruction process is performed in reverse direction, i.e., NME decoding [START_REF] Zainuddin | Nanonetwork minimum energy coding[END_REF], de-quantization and DCT inverse transform.

The advantages of SEIC-DCT to JPEG are as follows:

• SEIC-DCT does not need zig-zag scanning, which requires more processing, i.e., electronic circuit and more energy.

• SEIC-DCT uses fixed codeword length, which simplifies the decompression process and is more robust against transmission error.

4.1.2/ SEIC DISCRETE WAVELET TRANSFORM (SEIC-DWT)

Wavelet transform is energy efficient, which makes it a suitable candidate for image compression. It also has other properties, such as multi-resolution and progressive reconstruction, that provides wavelet a powerful tool for image and video compression [START_REF] Thyagarajan | Still image and video compression with Matlab[END_REF].

Wavelet transform has spatial/location (capturing transient) and frequency resolution, where Fourier transform has only frequency resolution. In image compression, the ability to distinguish areas of intense activity from flat region allows to allocate different number of bits of quantization to these different regions. As a result, high compression can be achieved without sacrificing visual quality. Wavelet transform uses wavelets as its basis function.

Wavelet-based image compression uses sub-band coding which presents the different frequency components within an image. Sub-band coding consists of a sequence of filtering and sub-sampling processes. The wavelet decomposition for image x is shown in Fig. 4.2. First, the input sequence x with size NxN is filtered row by row by two filters (a low pass filter h 0 and a high pass filter h 1 ) then sub-sampled by factor 2, which results in two outputs of length N/2 in each filter. Next, these coefficients are filtered and subsampled column by column with the same process as previous (and the same filters). As a result, the output y consists of four DWT coefficients (LL, LH, HL and HH) each of size (N/2) x (N/2). The LL coefficient is called approximation coefficient, while LH, HL and HH are detail coefficients. The approximation coefficient has coarse information, which contains the significant information (y LL ). The image compression process discards the insignificant information and maintains the significant information.

In the synthesis or reconstruction stage shown in Fig. 4.2, the procedure is repeated in reverse direction using another set of low pass and high pass filters (g 0 and g 1 respectively). The reconstructed image has the same size as the original, and the result is close to the original image (but not the same) due to filtering effects.

In DWT transform, image is transformed into transform coefficients with the same size of image. Multi-level decomposition can be performed (level i + 1) using sub-band LL i to produce LL i+1 , HL i+1 , LH i+1 and HH i+1 bands, each with size N/(2i) x N/(2i). The process of multi-level decomposition is illustrated in Fig. 4.4.

SEIC-DWT algorithm

At the sender, SEIC consists of three steps: • Perform the first decomposition of DWT (and only this).

• Quantize the coefficients and convert them to binary stream.

• Reduce the number of bit 1 in binary stream by a low-weight code.

These steps are shown in Fig. 4.5 and detailed in the following algorithm:

1. The image x is filtered row by row using low pass filter h 0 and down sampled by factor 2, then filtered column by column using filter h 1 and down sampled by factor 2.

The output is y with a size of 1/4 of the input x.

2.

Next, the output of transformation y is quantized by uniform scalar quantizer to fit into n bits pulse code modulation (PCM) or n bit NME code.

3. NME performs simple mapping from input symbol to a codeword, which produces binary stream for transmission.

At receiver, the reconstruction process is performed in reverse direction, i.e., NME decoding, de-quantization and DWT inverse transform.

The first step in SEIC algorithm is related to the obtained energy efficiency. As already stated, SEIC uses only one decomposition level. Instead, if several levels are used, the larger the level i, the larger the compression ratio. For example, transmitting only LL 1 yields compression ratio 4:1 and LL 2 yields 16:1 as shown in Fig. 4.4. Therefore, minimum energy efficiency can be estimated for each level. For example, the minimum energy efficiency using level 1 decomposition is 75 % (this value is obtained from the discard of 75 % coefficients from data input), the minimum energy efficiency for level 2 is 93 % and for level 3 is 98 %.

Our method uses only the approximation coefficient and discards the detail coefficients of DWT. SEIC-DWT is both simple and energy efficient. It is simple because:

• In a wireless node-device, the compression is performed by an electrical circuit.

Compared to other DWT-based image compression methods, such as JPEG 2000, SEIC uses only 25 % of the circuit in DWT transforms. The circuit size is smaller than original DWT (i.e., use only 1 sub-band from the 4 sub-bands), which is preferable for a nano-device. • Compared to DWT, there is no negative coefficient (negative coefficients appear only in detail coefficients), i.e. there is no additional memory to save negative sign for each of the coefficients.

It is energy efficient because:

• Due to fewer circuit/electrical in DWT components, the computation energy is smaller by approximately 75 % than original DWT.

• Output data size is reduced by 75 % from the input size in each decomposition level, i.e. each decomposition level reduces the number of coefficients by 75 % of data input. As shown in Fig. 4.4, the input has data size N x N, then the approximation coefficient at level i has data size N/(2i) x N/(2i). The larger the decomposition level, the larger the energy efficiency (compression ratio) which can be obtained, but the lower the reconstructed image quality.

The use of fixed codeword size in NME decoding makes symbol detection simpler, compared to variable codeword size as used in JPEG and JPEG 2000. In many cases, a 1-bit error in variable codeword size causes symbol error detection for the next symbols (error bits destruct the reconstruction process).

4.2/ NUMERICAL RESULTS

The goal of this section is to confirm the theory, i.e. computation consumes much less energy than transmission, as given in Introduction, through simulation.

In the following, we numerically investigate the performance of SEIC in terms of visual quality, energy efficiency, perpetual operation and robustness against transmission error, and compare it with several well-known compression standards (which do not use NME).

In order to make our simulation more realistic, we use the following parameters: pulse width T p = 1 ps (the first derivation of a 100 fs-long pulse results in a 1 ps-long pulse, to prevent DC component in Gaussian pulse [START_REF] Zainuddin | The effects of nanosensors movements on nanocommunications[END_REF]), pulse power P = 1 mW [START_REF] Dragoman | Terahertz fields and applications[END_REF], so pulse energy E p = P T s = 1 fJ. In wavelet transform, we use wavelet biorthogonal4.4 and quantization 8. For simulation we use MATLAB. For diversity, in the simulation we use 4 images with resolution 256x256 pixels, as follows:

• Cancer cell image (cancer256.bmp) to represent an image with micro scale content (a cell).

• Lena image (lena256.bmp) to represent images with high correlation between adjacent pixels.

• Barbara image (barbara256.bmp) to represent images with moderate correlation between adjacent pixels.

• Baboon image (baboon256.bmp) to represent images with low correlation between adjacent pixels.

4.2.1/ IMAGE QUALITY

The metrics we use to measure the visual quality of reconstructed images are structural similarity (SSIM) and peak signal to noise ratio (PSNR). SSIM provides better consistency with human visual perception than PSNR [START_REF] Wang | Image quality assessment: from error visibility to structural similarity[END_REF]. For both of them, the larger the metric values the closer the received image to the transmitted one.

SEIC-DCT

The visual quality and energy efficiency for TS-OOK modulation are shown in efficiency, but the worse the visual quality. In all cases, SEIC-DCT outperforms DCT in terms of energy efficiency. This result motivates the use of SEIC-DCT in nanocommunications. The compression artifact begins to appear at Q l = 30. Therefore, SEIC-DCT uses Q l = 10 to maintain the image quality. The visual result for Cancer image is shown in Fig. 4.6. For Lena, the compression artifact starts to appear at area around the hat, as shown in Fig. 4.7. For Barbara, the compression artifact starts to appear around the face, as shown in Fig. 4.8. For Baboon, the compression artifact starts to appear around the nose, as shown in Fig. 4.9.

SEIC-DWT

4.2.2/ ENERGY EFFICIENCY

In order to investigate the effectiveness of our compression method from energy point of view, we compare the energy used in both cases, i.e. the energy to transmit the uncoded image to the energy to compress it and transmit the compressed image:

E Uncoded cons = E Uncoded tx (4.4) E Coded cons = E comp + E Coded tx (4.5)
where E cons is the energy consumption, E tx the transmission energy, and E comp the compression energy. We present the energy on the transmitter, but similar formulas apply for receiver too.

Transmission energy. In TS-OOK modulation, the transmission energy can obtained from the number of transmitted bits 1 and pulse energy:

E Uncoded tx = N Uncoded 1 E p (4.6) E Coded tx = N Coded 1 E p (4.7)
where E p is the pulse energy (1 fJ) and N 1 the number of bits 1. Table 4.3 presents the transmission energy for all used methods using these formulas. Column Energy consumption on transmitter shows that the energy varies between approximately 7 000 and 76 000 fJ.

Computation energy for coded. For image with resolution 256x256 pixels, JPEG compression executes 10 million instructions on an 8-bit micro-controller [START_REF] Oklobdzija | High-Performance Energy-Efficient Microprocessor Design[END_REF]. The computation energy can be reduced by factor 100 using JPEG dedicated hardware. As mentioned before, the computation in a nano-device consumes 0.1 aJ [START_REF] Akkari | Joint physical and link layer error control analysis for nanonetworks in the terahertz band[END_REF] per instruction. So, JPEG hardware compression consumes 10 fJ. The previous two paragraphs show that the compression process consumes less energy than transmission (10 fJ vs 7 000-76 000 fJ). Thus, numerical example results confirm theory, as given in the Introduction.

Energy efficiency. Energy efficiency denotes the ability of code to reduce the energy consumption at transmitter side:

ξ = E Uncoded tx -E Coded tx + E Comp tx E Uncoded tx 100% (4.8)
The energy efficiency for all images in various methods is shown in Table 4.3, where energy for compression has been discarded since it is negligible. It shows that SEIC-DCT outperforms JPEG in terms of energy efficiency and visual quality. For Cancer, the bit stream consists of 532 912 bits, the number of bit 1s is 296 399 bits. In SEIC, the bit stream has included the dictionary. For example, to transmit Cancer using SEIC-DCT, the number of bits 1s in dictionary is 546 bits and the number bit 1s in data is 54 326 bits, so the total number of bit 1s is 54 872 bits. Since a pulse transmission consumes 1 fJ, then to transmit Cancer, SEIC-DCT consumes E T x = 54 872 fJ. The SEIC-DCT bit stream consists of 591 016 bits. The drawback of SEIC-DCT is the largest energy consumption at receiver compare to others.

To conclude, the energy consumption for compression is negligible compared to the energy for transmission. Therefore, it is useful to compress the image before transmitting it. Otherwise said, the energy lost by compressing an image is much lower than the energy gained by sending a compressed image.

4.2.3/ ROBUSTNESS AGAINST TRANSMISSION ERROR

In general, compressed data is vulnerable to transmission error. One bit error may cause error propagation in reconstruction process which destroys the received image, e.g., dis- torted or file unable to open. This is not the case for SEIC. In this section we present the effect of error bit for transmitted image for all methods.

We investigate here the effect of error bits in the reconstruction (decompression) process at receiver. Due to limited computation in nano-devices, hard decision method utilized in nano-receiver, i.e., if the amplitude of received pulse is less than threshold then the received bit is 0 and vice verse. The effect of error bits in reconstruction process of each compression method are different. Using terahertz channel transition in eq.(2.28) and (2.29), the SSIM of various methods is shown in Fig. 4. [START_REF] Dragoman | Terahertz fields and applications[END_REF]. It shows that Uncoded, SEIC-DCT and SEIC-DWT have small SSIM degradation as the distances increase, which means that they are more robust then PNG, JPEG and JPEG 2000. Bit error probability at transmission distance 1 cm is very small, which causes no transmission error. As a result, all methods have the same image quality at transmitter and receiver for transmission distance 1 cm. The visual quality of reconstructed image at distance 10 cm for all methods is shown in Fig. 4.19. In uncoded transmission, error bits affect only certain pixels, which is also the same as SEIC-DWT method. Transmission error in SEIC-DCT affects only the related sub-8x8 pixels. In JPEG 2000 and JPEG, the error propagates, e.g., a one bit error causes errors in many pixels. In PNG, the error results in an image which cannot be reconstructed (file cannot even be opened). In order to obtain reliable transmission for compressed image, PNG, JPEG and JPEG 2000 require complex (powerful) error correction code, which is impractical for limited computation in nano-devices. While SEIC (DCT and DWT) can use simple error correction code such as Hamming code, since error does not propagate in decompression process. As conclusion, SEIC method is more robust against transmission error.

4.3/ CONCLUSIONS

We presented a simple and energy efficient image compression with two variants (SEIC-DCT and SEIC-DWT) for binary pulse-based wireless sensor networks at terahertz band. The method is based on DCT and DWT transform followed by low-weight coding. Compression in SEIC-DCT comes from quantization process of DCT coefficients, while SEIC-DWT uses only the approximation coefficients of DWT transform, then followed by NME for lossless compression. The simulation results show that our proposed method outperforms JPEG, JPEG 2000 and PNG in some very important metrics in our case: energy efficiency and robustness against transmission error. SEIC-DCT has better visual result, energy efficiency and complexity than JPEG, but requires larger energy consumption at receiver. The trade-off in SEIC-DWT is a lower image quality at receiver for larger energy efficiency.

SIMPLE ERROR CORRECTION CODES

FOR NANONETWORKS

5.1/ INTRODUCTION

In wireless sensor networks, information from the observed phenomenon should be reliably transmitted to the end system, in order to initiate the right actions [START_REF] Akyildiz | Wireless Sensor Networks[END_REF]. Terahertz band (0.1-10 THz) is characterized by high molecular absorption and high molecular noise, which make it vulnerable for data transmission. Thus, for reliable communication, nanonetworks require error control, such as automatic repeat request (ARQ) and Forward Error Correction (FEC). Complex and powerful FEC techniques cannot be directly implemented in nano-devices due to their limitations presented above. ARQ technique is prohibited due to limited energy (battery capacity) in nano-devices [START_REF] Jornet | Low-weight error-prevention codes for electromagnetic nanoneworks in the terahertz band[END_REF]. When the channel error is high, re-transmissions must be done frequently, which increases the delay and consumes more energy. Therefore, low complexity (simple) error correction coding is the best solution for nanocommunications.

We propose Simple Block Nanocode (SBN) to provide reliability in electromagnetic nanocommunications in terahertz band [START_REF] Zainuddin | Simple block nanocode for nanocommunications[END_REF]. We investigate the performance of SBN in terms of bit error probability and robustness against transmission error in image transmission. In [START_REF] Akkari | Joint physical and link layer error control analysis for nanonetworks in the terahertz band[END_REF], the authors compare ARQ, Hamming and Low Weight Channel (LWC [START_REF] Jornet | Low-weight error-prevention codes for electromagnetic nanoneworks in the terahertz band[END_REF]) codes at Terahertz band in terms of bit error probability (BEP) and conclude that LWC is the best one. We also investigate the energy consumed for image transmission using a sensor application whose goal is to detect cancer cells. The results show that our proposed code outperforms minimum energy channel (MEC) [START_REF] Kocaoglu | Minimum energy channel codes for nanoscale wireless commnunications[END_REF] and LWC codes in terms of reliability.

We called our code a nanocode. By extension of the meaning of the word nano, by nanocode we mean a code appropriate to nanocommunications. Indeed, SBN provides simplicity in the (de)coding process together with robustness and energy efficiency. Simplicity is important due to limitation in nano-devices. Simplicity for robustness comes from simple block code, while energy efficiency comes for NME code (presented in Chapter 2) for TS-OOK based modulation nano-devices. Comparing to Hamming code for example, SBN is flexible and more robust: Hamming code has fixed input size n and output size m, with m = 2 n -1 and n = 4, 5, 6, . . ., while SBN allows any m > n. Hamming code perfectly corrects 1 bit error, while SBN (6,3) also perfectly corrects 1 bit error, and SBN [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]3) perfectly corrects 2 error bits and up to 7 error bits.

5.2/ SIMPLE BLOCK NANOCODE (SBN)

Due to peculiarities of terahertz band (high path loss and high molecular noise) and limited computational complexity in nano-nodes, the design and implementation of channel coding in nanocommunications should take into account at least these characteristics:

• The information must be transmitted as fast as possible, which requires fast encoding and decoding time.

• The information must be reliably transmitted to the receiver, which requires low probability of decoding error.

• The number of hardware components should be minimized in order to fulfill the size requirement and to reduce the energy consumption in hardware.

In order to fulfill the above requirements, SBN uses NME code followed by a simple block code. Reliability is obtained from additional parity bits in the transmitted codewords, which increases data size. NME is used as a countermeasure to the increased data size due to block code.

The block diagram of SBN is shown in Fig 5 .1. SBN encoding algorithm is as follows:

• Binary stream from data source is processed by NME code to reduce the number of bits 1. NME encodes the input symbol size n to NME n bits (i.e. the output size is equal to the input size). This process reduces the transmission energy in TS-OOK modulation.

• Next, the output of NME coding is processed by block encoder with preferable code rate (i.e. ratio between input size and output size) to provide reliability in data transmission. The smaller the code rate, the better the error correction capability.

The decoding process is reversed: the block decoder followed by NME decoder.

Formally, SBN code is characterized by two parameters, SBN (m,n), where m is the codeword size and n the input symbol size.

5.2.1/ BLOCK ENCODER

In binary transmission, the output of source encoder is the information sequence of bits 0 and 1. In block coding, the information sequence x is segmented into n bits symbols u.

After NME step, block code encodes each n bits NME output u into m bits codeword v, where m > n, R = n/m, R is the code rate. Block code in SBN is defined by an n × m generator matrix G, composed by the identity matrix on the right and a random matrix on the left. The transmitted codeword v = u × G. Next, codeword v is transmitted to receiver through terahertz band using TS-OOK.

We have created four matrix generators, using random block codes. For SBN (6,3), the matrix generator is:

G =           1 1 0 1 0 0 1 1 1 0 1 0 0 1 1 0 0 1           (5.1)
and the mapping table is as shown in Table 5.1. The matrix generator for SBN [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]3) is:

G =           0 0 0 0 0 1 1 0 1 0 1 1 0 1 0 0 1 0 0 1 1 1 0 0 1 1 0 0 1 0 1 0 0 1 1 1 0 0 0 1 0 1 0 1 0 0 0 1           (5.2)
The matrix generator for SBN [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]5) is:

G =                      1 0 1 1 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 0 1 0 0 0 0 0 1 0 1 1 1 1 1 0 0 0 0 1 0 0 1 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 0 0 0 1 0 0 1 0 0 0 0 1                      (5.3)
The matrix generator for SBN [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF][START_REF] Erin | Energy optimal codes for wireless communications[END_REF] is:

G =                               
1 1 0 1 1 1 1 0 1 1 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 1 0 0 0 0 0 1 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 1 1 1 0 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 1

                               (5.4)

5.2.2/ BLOCK DECODER

If an error occurs during data transmission, then the received data is v = v s + e, where e = {e 1 , e 2 , . . . , e m }, e i = 1 if v s i v i , and e i = 0 if v s i = v i . In order to correct errors, the receiver uses syndrome s = v s .H T = e.H T to obtain the error pattern ê. H can be obtained directly from G, where G × H T = 0. The errors in v s can be corrected by computing the estimated codeword v s = v + ê. For example, for the symbol u = (101), the transmitted codeword is v = (101101), and the second transmitted bit is received in error due to the channel error, so the received word is v s = (111101). The receiver computes the syndrome S = v s .H T = (010), which generates the error pattern ê = (010000) given by Table 5.2. The output of decoder becomes u s = v s + ê = (101101), then the estimated symbol can be obtained from the last n bits of the estimated codeword u s = (101). As a result, the symbol is transmitted reliably to the receiver (u s = u), even if the channel introduced an error.

The ability of Block code to correct i errors in received word r is defined by the weight distribution α i . α i is defined as the number of error patterns in syndrome table with weight i. The weight distribution of SBN (6,3) is α 0 = 1, α 1 = 6 and α 2 = 1. SBN (n, k) is capable to perfectly correct i error bits if and only if the following condition is fulfilled:

α i = n i = n! (n -i)! i! (5.5)
The syndrome and error patterns for SBN (6,3) are shown in Table 5.2. SBN (6,3) has the ability to perfectly correct one bit error in received word. SBN (m, n) is capable to correct 2 m-n error patterns, where i=0 α i = 2 m-n . Two different matrix generators provide different error patterns. Since they have the same number of error patterns, then they have the same capacity to correct errors, more precisely, for a given input data their BEP could be different (as it depends on the noise in the channel), but in average their BEP is the same.

SBN is a simple process. It involves one mapping corresponding to NME and one mapping corresponding to block encoder. These two mappings can be combined into one mapping. Mapping process is very simple, hence appropriate for nanodevices.

In order to further minimize the encoding and decoding complexity of both hardware and computation process, it is better to use small values for the symbol block length n and codeword length m. For example, in the next section we will use message block length n = 3, 5 and 7 bits and codeword lengths m = 6 and 15 bits. The weight distributions for the blocks with m = 16 (m = 6 has already been presented at previous 3 paragraphs) are the following:

Figure 5.2: The encoding circuit for (6, 3) linear block code.

• SBN (16,3): α 0 = 1, α 1 = 16, α 2 = 120, α 3 = 550, α 4 = 1635, α 5 = 3030, α 6 = 2480 and α 7 = 360.

• SBN [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]5):

α 0 = 1, α 1 = 16, α 2 = 120, α 3 = 511, α 4 = 964, α 5 = 428 and α 6 = 8.
• SBN [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF][START_REF] Erin | Energy optimal codes for wireless communications[END_REF]:

α 0 = 1, α 1 = 16, α 2 = 111, α 3 = 273, α 4 = 110 and α 5 = 1.
According to (5.5), SBN [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]3) and SBN [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]5) are able to perfectly correct 1 and 2 error bits in a received word and up to 7, respectively 6 error bits (depending on error patterns), while SBN (15,7) is able to perfectly correct up to 2 error bits and up to 5 error bits.

5.2.3/ HARDWARE AND EXECUTION TIME COMPLEXITY

Nano means small and fast. So we are interested in circuit complexity, such as number of memory units and other electronic components, and execution time in both encoding and decoding processes.

5.2.3.1/ ENCODER COMPLEXITY

The encoding circuit for SBN consists of NME encoder and Block encoder. NME encoder requires an n bits message register and 2 n × n memory units. The block diagram of Block encoder for SBN (6,3) is shown in Fig. 5.2. The encoder consists of n shift registers (e.g. flip-flop) for message input bits, mn shift registers for parity check bits, mn modulo-2 adders and a switcher. During the encoding process, the message u = {u 0 , u 1 , . . . , u n-1 } is shifted into the message register and simultaneously into the channel. When all the message has entered the register, the switch is moved to the parity shift register, and all the parity check bits are transmitted.

In MEC, the encoding process is done by mapping from message to codeword. This requires a n bits message register, 2 n+1 × m memory units (to save codewords when P max < 0.5 and codewords when P max > 0.5) and 2 n+1 AND gates (to do the mapping), where n is the message block size and m is the codeword size. For example, for MEC with d min = 4, the number of memory units is

2 n+1 × 2 n × 4/2 = 2 2n+2
) , which is exponential in n, and the number of AND gates is m times less.

In LWC, the encoding process is done by mapping message to codeword. This requires an n bits message register and 2 n × m memory units.

The encoding time for LWC and MEC are the same, two time units, which are 1 time unit to loading the n bits message, and 1 unit time for mapping process. In SBN there is additional 1 time unit for block encoder.

As a conclusion, LWC encoder has the lowest hardware complexity and SBN has the longest encoding time. Since MEC decoding uses maximum likelihood decoding, the decoder requires the same amount of memory units as the encoder (2 2n+2 ), plus 2m memory units and m modulo-2 adders for comparator circuit, which is exponential in n. The decoding time for maximum likelihood decoding requires 2 n time units (one comparison operation in one time unit).

LWC decoder requires an n bits message register and 2 n × m memory units.

As a conclusion, LWC decoder has lowest hardware complexity and MEC has the longest decoding time.

5.2.4/ NUMERICAL RESULTS

In this section, we numerically investigate the performance of MEC, LWC and SBN codes in terms of bit error probability. We also investigate the feasibility of image transmission through a sensor application in biomedical field, with additional performance analysis such as energy consumption per information bit and received image quality.

In our model, the energy consumption to transmit a pulse is E tx p = 1 fJ and the energy to receive a pulse is 10 times smaller E rx p = E tx p /10 = 0.1 fJ [START_REF] Jornet | Joint energy harvesting and communication analysis for perpetual wireless nanosensor networks in the terahertz band[END_REF]. Also, we use a simple pointto-point communication, which means there is no multi-user interference. For simulation we use MATLAB R .

In MEC, the decoding error occurs when the number of bit errors in a received word is larger than t = (d min -1)/2, where d min is the minimum distance. Therefore, the bit error probability for MEC is [START_REF] Sklar | Digital Communications, Fundamentals and Applications[END_REF]:

P MEC E = n i=t+1 n i P i E (1 -P E ) n-i (5.6)
In LWC, the bit error probability is equal to uncoded transmission, which can be obtained from (2.21).

In SBN, the decoding error occurs when the errors are not in error patterns. The bit error probability for SBN is [START_REF] Lin | Error Control Coding[END_REF]:

P S BN E = 1 - n i=0 α i P i E (1 -P E ) n-i (5.7)
where P E is bit error probability given by (2.21).

We compare the bit error probability of MEC, LWC and SBN using the same code rate (i.e. ratio between input size n=3 and codeword size m=16), for which the receiver consumes the same amount of energy, i.e., the receiver received the same number of bits. The energy consumption at transmitter will be investigated later in the next section. The codes are MEC [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]3,4), LWC (16,3,3), SBN (6,3) and SBN [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]3).

Bit error probability for MEC is shown in Fig. 5.4. Bit error probability is a function of transmission distance (i.e. the larger the distance, the larger the number of received error bits). MEC with d min = 4 can correct up to t = 2 error bits, which is better than Uncoded which does not have error correction. For example, at transmission distance 10 cm, BEP of Uncoded is around 10 -3 and BEP of MEC is around 10 -6 . It means that MEC has 10 3 fewer errors than Uncoded.

In Fig. 5.4, the BEP of MEC is around 10 -12 for distance 1 cm, 10 -6 for distance 10 cm and 10 -4 for distance 1 m.

Bit error probability for LWC is shown in Fig. 5.5. Since probability of bit 1 in LWC P LWC 1 = 3/16 is smaller than probability of bit 1 in uncoded P Uncoded 1 = 0.5, BEP of LWC is smaller than BEP of Uncoded (as discussed in Chapter 2). Since LWC has no error correction capability, if an error occurs and received codeword is not in the mapping table, the receiver produces all zero codeword. This process may produce many error bits at receiver, i.e., from end-to-end perspective.

However, note that LWC could have error correction capability by using soft-value in bit detection. Constant weight codeword allows LWC decoder to find the estimated codeword. For example, in LWC [START_REF] Hanson | Fundamental transmitting properties of carbon nanotube antennas[END_REF][START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]6) [89], if the received codeword has 12 bits 1, then receiver can estimate the transmitted codeword by taking 6 highest power/amplitude bits as bits 1. But this process requires additional complexity (e.g. additional memories, adder circuit, comparator (to compare bits) circuit, etc.), which increases processing delay, circuit size and computational energy.

Bit error probability for SBN with various code rates is shown in Fig. 5.6. It shows that SBN with smaller code rate has better bit error probability. This is because SBN with smaller code rate has larger mn, i.e., larger 2 m-n error patterns. SBN (6,3) and SBN [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF][START_REF] Erin | Energy optimal codes for wireless communications[END_REF] have almost the same bit error probability, since their code rates are almost the same. Fig. 5.4 and 5.6 show that SBN [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]3) and SBN [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]5) outperform MEC in BEP.

5.2.5/ ENERGY CONSUMPTION

For the time being, the energy consumption of graphene-based nano-machine remains unknown. Therefore, we focus on the energy consumed in the communication part. In TS-OOK modulation [START_REF] Jornet | Femtosecond-long pulse-based modulation for terahertz band communication in nanonetworks[END_REF], the energy consumption at transmitter is equal to the number of transmitted bits 1 multiplied by the energy to transmit a pulse (1 fJ) and the energy consumption at receiver is equal to the number of received bits (0 and 1) multiplied by the energy to receive a pulse 0.1 fJ [START_REF] Jornet | Joint energy harvesting and communication analysis for perpetual wireless nanosensor networks in the terahertz band[END_REF]. The energy consumption to transmit and receive cancer image with resolution 256x256 pixels is shown in Table 5. 3. It shows that MEC consumes less energy than LWC and SBN at transmitter, while consuming more energy than LWC and SBN at receiver. Total energy consumption in communication can be obtained by summing the energy consumption in transmitter T x and receiver T r. MEC has the largest total energy consumption, while LWC is the lowest. Let's recall that SBN increases the energy consumption, but increases the reliability. For example, in Table 5.3, SBN (16, 3) increases the transmission energy by a factor of 1, 293, 177/293, 302 = 4.4, and improves the reliability (probability of decoding error) by a factor of BEP uncoded divided by BEP coding = 2.7 × 10 -2 /2.9 × 10 -5 = 931.

5.2.6/ RECEIVED IMAGE QUALITY

In order to assess the quality of received images we use PSNR and SSIM, where PSNR is denoted in decibel (dB) and SSIM is 0 ≤ S S I M ≤ 1. The larger the value of SSIM and PSNR, the closer the received image to the transmitted one. SSIM 1 means the received image is the same as the transmitted one, which means no error in transmission.

In order to investigate the code capability to correct errors, we generate noise with bit error probability for bit 0 and bit 1 using (2.28) and (2.29) respectively at distance 1 m, and use it for all codes with input symbol size 3. The reconstructed images at receiver are shown in Fig. 5.7. SBN [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]3) has the lowest bit error probability, which gets the best quality for received image. This result confirms that SBN outperforms MEC and LWC in terms of PSNR and SSIM.

5.3/ CONCLUSIONS

We presented SBN, an error correction code to provide reliability in electromagnetic nanocommunications at terahertz band. SBN outperforms the two other error correction codes found in the literature, MEC and LWC, in terms of bit error probability (reliability) at the expense of more energy. However, the energy consumption factor is much smaller than the reliability factor. LWC has less complexity than MEC and SBN, i.e., less memories and electrical components. In encoding time, SBN has the longest time, due to mapping process in NME and adding parity in Block encoding, while LWC and MEC only the mapping process. In decoding time, MEC has the longest time, due to maximum likelihood estimation process.

APPLICATIONS

There are many issues need to be addressed before nanonetworks can be realized. One of the challenges in the realization of multimedia nanonetworks is the availability of energy in nanodevices to transmit multimedia content. In this chapter, we investigate the perpetual operation of nanonetworks using energy harvesting mechanism. In addition, many applications need mobile nanosensors due to the environment. The distance between transmitter and receiver is then changing dynamically, which influences the communications metrics such as information rate and error rate. We investigate the effects of nanodevices movement to maintain the quality of service (QoS) at application layer. Moreover, we expand our method by combine SEIC and SBN to obtain energy efficient and robust image transmission in nanonetworks. Finally, we investigate the application video streaming in terahertz networks.

6.1/ PERPETUAL OPERATION OF NANONETWORKS

As discussed earlier, nanodevices have a very small dimensions and replacing the battery is almost impossible. Hence, the only option for nanodevices to have perpetual operation is to harvest energy from the environment. Classical energy harvesting methods from solar, wind and underwater inappropriate for nanonetworks. For example, there is no sunlight in human body, wind and underwater turbulence are not feasible due to the technology limitations [START_REF] Jornet | Joint energy harvesting and communication analysis for perpetual wireless nanosensor networks in the terahertz band[END_REF]. One appropriate method for nanonetworks is to use a piezoelectric nano-generator based on Zinc Oxide (ZnO) nanowires [START_REF] Jornet | Joint energy harvesting and communication analysis for perpetual wireless nanosensor networks in the terahertz band[END_REF]. The proposed energy harvesting mechanism allows nanonetworks to operate in infinite lifetime, given that energy consumption and energy harvesting processes are jointly designed. A piezoelectric nano-generator is shown in Fig. 6.1. The circuit consists of ZnO nanowires, a rectifying circuit and a ultra-nanocapacitor. When the nanowires are bent or compressed, an electrical current is generated between the ends of the nanowires. When the nanowires are released, an electric current in the opposite direction is also generated. The charge generated by ZnO nanowires is used to charge the ultra-nano-capacitor, after proper rectification. Perpetual operation can be obtained by limiting energy consumption, so that it does not exceed the energy harvested.

In order to investigate the possibility of image transmission in nanodevices, we take into account the energy to transmit an image and the capacity of nano-battery. Cf. Sec. 4.2.2, the energy to transmit an image with resolution 256x256 pixels using TS-OOK modulation is around N 1 = 300 pJ for uncoded and N 1 = 20 pJ for compressed. A state of the art Figure 6.1: Piezoelectric nano-generator [START_REF] Jornet | Joint energy harvesting and communication analysis for perpetual wireless nanosensor networks in the terahertz band[END_REF].

nano-battery has capacity of 800 pJ [START_REF] Jornet | Joint energy harvesting and communication analysis for perpetual wireless nanosensor networks in the terahertz band[END_REF], so the number of images that can be sent with a battery initially fully charged is 800 pJ/N 1 ≈ 2 images for Uncoded and 40 images for compressed.

We now compute how many images per second a nano-camera with a harvesting module can send. Using energy harvesting mechanisms in [START_REF] Jornet | Joint energy harvesting and communication analysis for perpetual wireless nanosensor networks in the terahertz band[END_REF], the battery capacity is a function of vibration number (cyles) as shown in Fig 6 .2. The nano-battery capacity is approximately 800 pJ when the number of vibration cycles is 2500 cycles and 200 pJ for 500 cycles. In health monitoring, nanodevices are implanted into human body. The vibration can be obtained from heart beat, which is around 2 Hz. Hence, the time needed to fully charge the nano-battery is 1 250 -250 seconds.

For the application of image transmission, we use battery capacity 200 pJ. In order to transmit Cancer image, the required transmission energy at transmitter E tx is 296 399 fJ for uncoded and 28 182 fJ for SEIC-DWT (in Sec. 4.2.2). The perpetual operation can be obtained when the consumption energy is equal to the harvested energy. The energy harvesting rate E hr can be obtained from the nano-battery capacity 200 pJ divided by time to fully recharge it, 250 seconds, which is 800 fJ/sec. Therefore, the perpetual operation for uncoded is E hr /E tx ≈ 1 image/ 7 minutes and for SEIC-DWT around 2 images/minute.

6.2/ THE EFFECTS OF NODE MOVEMENT IN NANONETWORKS

In many applications of nanonetworks, nanodevices are placed inside the observed medium. For example, in health monitoring, Body Area Networks (BAN), nanosensors could be used in blood circulation. The movement speed and coverage area are defined by the speed of blood and location within the patient body. Since communications performance of nanonetworks, e.g., information rate and error control, are function of distance, then the mobility of nanodevices impact those performance. As a result, the quality of service (QoS) at application layer should take into account these effects in the design. In this section, we present the effects of node movement, such as pulse time-shift, information capacity reduction, error rate increase and Doppler effect, when receiver node moves far away from the sender.

6.2.1/ PULSE TIME-SHIFT

TS-OOK modulation needs a receiver highly synchronized to the transmitter. Indeed, during communication, transmitter sends at fixed intervals T s and receiver listens the channel at the same interval T s . This type of communication works as long as the receiver listens at the right times. Since distance between transmitter and receiver changes when nodes are mobile, the time when the signal is received changes too. Pulse time-shift is defined as the difference in time between the actual arrival of the signal and its estimated arrival.

We consider that the transmitter is stationary and the receiver moves away from it with speed v. The transmitter sends a pulse each T s seconds. The various parameters used to compute the pulse time-shift are shown in Fig. 6.3. It could be noticed that the same distance d mobile (between position when first bit is received and when second bit is received) is travelled by the receiver:

d mobile = v(T s + t shift ) (6.1)
and also by the signal when transmitting the second bit (assuming that it propagates in the channel with speed of the light):

d mobile = ct shift (6.2)
Putting on one equation the right side of both formulas, we obtain:

ct shi f t = v(T s + t shift ) (6.3)
(cv)t shift = vT s (6.4)

t shift = 1 c v -1 T s (6.5)
Since c/v 1, equation becomes:

t shift ≈ v c T s (6.6)
The effect of the receiver movement is important in order to investigate the percentage of pulse time-shift according to the pulse duration T p . If the value of the pulse time-shift percentage t percentage is greater than 100%, the symbols could not be correctly detected, and in some cases the received symbols even overlap, effect known as Inter-Symbol Interference (ISI). This effect increases as the size of a packet data increases. The pulse time-shift percentage t percentage can be computed as follows:

t percentage = t shi f t T p × 100% (6.7)
As a numerical example, we suppose that nanosensors are embedded into a human body for a health monitoring application. The fastest blood speed in vessel is inside the aorta which is 0.4 m/s [START_REF] Tortora | The cardiovascular system: Blood vessel and hermodynamics[END_REF]. For TS-OOK modulation we are using the following parameters: pulse duration T p = 10 -12 (1 picosecond) and pulse period T s = 10 -9 (β = 1000). Using equation (6.6), pulse time-shift is therefore:

t shi f t = v c T s t shi f t = 0.4 (3 × 10 8 ) × 10 -9
t shi f t = 0.13 × 10 -17 (s)

Next, we take into account the percentage of pulse time-shift to pulse duration:

t percentage = t shi f t T p × 100% t percentage = 0.13 * 10 -17 10 -12 × 100% t percentage = 1.3 × 10 -4 %
The result shows that the pulse time-shift is very small compared to the pulse duration for a 1 bit transmission. But, since the effect is cumulative, the movement will introduce ISI at around the 770,000-th bit in the binary sequence (when t percentage exceeds 100%) if the pulses are transmitted in burst. In this case, we conclude that the pulse time-shift can introduce ISI for large data transmission if countermeasures are not taken.

6.2.2/ INFORMATION CAPACITY REDUCTION

To investigate the effect of node movement on information capacity, we are using parameters for TS-OOK pulse in equation (2.11, in page 15), such as an energy per pulse of 1 fJ, a variant σ = 100 femtoseconds, and a delay µ = 500 femtoseconds. The graph of the Gaussian pulse and of the Gaussian monopulse (first derivative of the Gaussian pulse) and their power spectral density (PSD) are shown in Fig. 6.4. It shows that the monopulse is able to eliminate the direct current (DC) component from the Gaussian pulse. Moreover, the pulse duration for monopulse signal becomes 1 picosecond (instead of 100 femtoseconds).

The achievable information rate of TS-OOK modulation in terahertz band (0.1-10 THz) can be obtained using equation (2.20, page 18). The setup parameters are the distance range is 0-100 m, B = 10 13 (all the spectrum is in THz band), β = 1000, the initial distance d is 0 m, the receiver movement speed v is ranging from 1 mm/s to 1 m/s, and the movement duration t mobile is 0 ≤ t mobile ≤ 10 s. The achievable information rate during the movement for various speed, is shown in Figure 6.5. The results show that the receiver movement has significant effects on the allowable maximum information rate. For example, when the receiver speed is equal to 1 m/s, the allowable maximum information rate is 9 Gbps (10% reduction from the information rate of the stationer receiver).

6.2.3/ ERROR RATE INCREASE

Since the THz band has characteristics such as the frequency selection and a very high attenuation, the received signal will be much distorted for longer transmission distances.

The hop distance between a source node to the sink node should take into account the distortion experienced by the signal. In this case, we will investigate the effect signal quality reduction during receiver movement. This step is important for signal detection at receiver side, i.e., if the received signal is very distorted, the receiver will need an additional signal processing module, such as equalizer, rake receiver, or orthogonal frequency division multiplexing (OFDM).

Node movement also has an effect on the bit error rate. A larger transmission distance between a transmitter and a receiver yields a higher bit error rate, due to larger signal attenuation and absorption noise in the THz band. The bit error rate for various movement speed is shown in Fig. 6.6. The results show that the movement speed influences the achievable bit error rate. In multimedia services, e.g., video streaming, a bit error rate less than 10 -4 is required [START_REF] Sheluhin | Effect of video Streaming space-time characteristics on quality of transmission over wireless telecommunication networks[END_REF]. If nanonetworks are used to provide such services, the speed must not exceed 1 cm/s. For larger speeds, for example 1 m/s, the achievable bit error rate would be larger than 10 -2 . It would then require error correction codes to fix errors, such as those we proposed in chapter 5.

Furthermore, we can investigate the signal quality at certain distances using the model presented in [START_REF] Jornet | Low-weight error-prevention codes for electromagnetic nanoneworks in the terahertz band[END_REF]. As shown in Fig. 6.7, the received signal is spread during propagation. Larger distances result in a larger signal spread, which introduces ISI at the receiver side.

In addition to very high attenuation in higher frequency signal, the signal's component in these frequencies is eliminated, so in frequency domain the signal is compressed.

According to Fourier transform, if the signal is compressed in frequency domain, then in the time domain the signal it is spread [START_REF] Proakis | Communication Systems Engineering[END_REF]. As shown in Fig. 6.7 when a receiver moves away from a transmitter, higher frequencies in received signal are getting more distorted along the propagation. For example, when the transmission distance is 1 meter, the received signal is spread 3 times of the pulse duration. This phenomenon restricts the value of the spread factor in TS-OOK modulation, i.e., β ≥ 3.

6.2.4/ DOPPLER EFFECT

The moving receiver will receive the electromagnetic waves from a transmitter with different frequencies, event known as the Doppler effect. The amount of frequency shifting depends on the relative velocity v between transmitter and receiver. For a relatively slow movement compared to the velocity of the waves, the shifting frequency is formulated [START_REF] Rosen | Encyclopedia of Physical Science[END_REF] as:

∆ f = v c f 0 (6.8)
where f 0 is the operating frequency.

By using first derivative of the Gaussian pulse as the transmitted signal in TS-OOK modulation, the spectrum is centered at 1.6 THz. Using equation (6.8), for a stationary transmitter and a moving receiver with a speed of 1 m/s, the shifting frequency will be:

∆ f = v c × f 0 ∆ f = 1 3 × 10 8 × 1.6 × 10 12 ∆ f = 5333 Hz
The movement of the receiver will shift the spectrum of the received signal around 5 kHz lower (higher if get closer) than the transmitted signal at the transmitter side. As shown in Fig. 6.4, the spectrum of transmitted signal is around 4 THz, while the spectrum shift is only 5 kHz. As a result, the node movement will have a small impact in the signal detection. We conclude that the Doppler effect in nanonetworks is negligible.

6.3/ ROBUST IMAGE TRANSMISSION IN NANONETWORKS

We combine SEIC and SBN in a simple, energy efficient, and robust code (SERC), to obtain energy efficient and robust image transmission in nanonetworks. As discussed in Chapter 4, SEIC-DCT has a very good visual quality, high energy efficiency and is robust against transmission error. Therefore, SERC uses SEIC-DCT to compress image data and SBN to correct error in transmission process. The system obtains energy efficiency as long as the increasing data size in SBN (redundant data for error correction) is less than reducing data size in SEIC-DCT. SERC (m,n) is defined as SEIC-DCT with SBN (m,n). The energy efficiency of SERC for used images is shown in Table 6.1. In Table 4.3 page 68, SEIC-DCT obtains energy efficiency ξ more than 80 % for all images. SERC (6,3) uses SBN (6,3) which doubles the data size, as a result the energy efficiency is dropped to 40-60 %. On the other hand, SERC (16,3) has negative energy efficiency for images Cancer and Baboon; this is the price to obtain robustness.

In order to measure the image quality of received image in nanocommunications, i.e., using TS-OOK modulation and terahertz band, we use Cancer image and the transmission distance between transmitter and receiver varies from 1 cm to 1 m. The average SSIM is shown in Fig. 6.8. SSIM of uncoded transmission decreases as distance increases. SERC have better SSIM/visual quality since it has error correction capability. SERC [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF]3) provides the same image quality at transmitter and receiver up to distance 1 m.

6.4/ ROBUST VIDEO TRANSMISSION IN TERAHERZ BAND

Terahertz band provides very large bandwidth, which allows ultra-high-speed data communication, such as 5G cellular networks, Terabit Wireless Local Area Networks (T-WLAN) and Terabit Wireless Personal Area Networks (T-WPAN) [START_REF] Akyildiz | Terahertz band: Next frontier for wireless communications[END_REF]. These applications allow ultra-high-definition multimedia streaming to smartphones, high-definition holographic video conference, etc. In biomedical field, multimedia nanonetworks enable holographic human organ for diseases detection, such as the presence of cancer cell, bacteria, virus, or display the sick organ in holographic form to minimize the surgery process. We are therefore interested in video transmission in nanonetworks.

Intuitively, we think that a video application gives similar results on robustness as the image application with larger data size. This sections analyzes the robustness of a video application. To investigates video transmission in terahertz band, we use SERC to obtain energy efficiency and robustness against transmission error. The block diagram of video transmission using SERC is shown in Fig. 6.9. Video signal can be obtained from camera devices, such as camcorder, smartphone camera, nano-camera, etc. A pixel in color image and video can be represented by three values, i.e., red (R), green (G) and blue (B).

In order to achieve higher compression efficiency, the RGB components are converted to luma (the perceived brightness) and chroma (the perceived color) components. Luma Y corresponds to a weighted sum of the R,G and B components and chroma (U and V) correspond to the color differences with luma being absent, as follows:

Y = 0.299R + 0.587G + 0.114B (6.9)
U = B -Y (6.10)

V = R -Y (6.11)
Since Human Visual System (HVS) is less sensitive to the difference color, chroma components can be scaled and sub-sampled without significantly sacrificing the visual quality. For example, in National Television System Committee (NTSC) format, the scale are 0.493 for U and 0.877 for V, and the size of U and V are four times smaller than Y.

In simulation, we use Foreman.YUV with Quarter Common Intermediate Format (QCIF) resolution (176 × 144 pixels) . We use TS-OOK modulation with pulse energy 1 fJ. The transmission energy T x at transmitter is shown in Table 6.2. It shows that SERCs obtain energy efficiency from Uncoded. SERC (6,3) obtains the largest energy efficiency, since it uses the smallest redundancy in error correction.

Visual quality of received video is a function of distance. The larger the distance, the smaller the image quality (SSIM). The average SSIM of the first forty frames of Foreman, for distances up to 5 m is shown in Fig. 6.10. SSIM of Uncoded degraded significantly as the distance increased. SERC (16,3) obtains the best SSIM, since it has the best error correction capability. SSIM of the first forty frames of Foreman at transmission distance 3 m for all used methods is shown in Fig 6 .11. The visual quality of Foreman at distance 3 m is shown in Fig. 6.12. Transmission error in SERC causes blocking error, while in uncoded the error causes pixel error. As a conclusion, SERC provides energy efficiency and robustness against transmission error for image and video transmission in nanonetworks.

6.5/ VIDEO STREAMING IN NANONETWORKS

Video streaming is a classical application on Internet nowadays, responsible for over 70% of the downstream bandwidth in evening hours in USA [START_REF]The global internet phenomena report[END_REF].

Video streaming means that video is seen on the receiver well before the video ends being transmitted, during its transmission. Several kinds of video streaming exist, such as video on demand (VoD), videoconferencing, video surveillance and broadcasting television. Each of them has its characteristics. For example, VoD needs few lost packets, and all data is already available and stored on a server. Video conferencing needs a very small delay and jitter, and data is sent as soon as it is generated. Video surveillance needs small delay, so that intruders do not have the time to alter or remove sensible data.

In broadcasting television, data is available a few seconds before transmission and has numerous receivers.

Therefore, video streaming has a real-time specificity. Data needs to arrive in time. Timeliness becomes as important as a loss. Indeed, if a packet arrives at receiver after its playing time, it is useless, like a packet loss. Classical issues in IP networks interfering with video streaming are lost packets, delay and jitter. A reason for these issues is that a classical video is inelastic, i.e. data sent does not adapt to network conditions. This means that if the video bit rate is higher than the bandwidth, video will regularly freeze on receiver; if the bit rate is smaller that the bandwidth, network is under utilized. A solution is to make video data elastic through video adaptation, for example changing bitrate encoding at sender during streaming in order to always meet network bandwidth.

In [START_REF] Dedu | A first study on video transmission over a nanowireless network[END_REF], we investigate the performance of video streaming in nanonetworks. Propositions have been made for defining an energy-efficient physical layer [START_REF] Jornet | A physical layer aware MAC protocol for electromagnetic nanonetworks in the Terahertz band[END_REF][START_REF] Wang | Energy and spectrum-aware MAC protocol for perpetual wireless nanosensor networks in the Terahertz band[END_REF] but transmitting video on top of these different layers is still an open issue (but has been studied in ultrawide band networks in [START_REF] Campelli | A cross-layer solution for ultrawideband based wireless video sensor networks[END_REF]). In fact, we think that a cross-layer approach is needed in the design of the communication layers of nano-wireless communications. In a previous work [START_REF] Boillot | Efficient simulation environment of wireless radio communications in mems modular robots[END_REF], we studied the integration of wireless capabilities in micro-robots of the Claytronics project, showing the enhancement created by wireless communications, but not using nano-wireless communications yet.

This work is at the conjunction of these four research fields: micro-robots, IoT, nanowireless communications and video streaming, and it presents a preliminary study on the possibility to stream video between micro-robots viewed as IoT elements and using nanowireless communications. The objective is to learn some lessons on the efficiency of the current nano-wireless physical layer in order to enhance it afterwards. We use Nano-Sim [START_REF] Piro | Simulating electromagnetic-based nanonetworks in the network simulator 3[END_REF], an NS3 plugin for simulating the nano-wireless physical layer. We merged into Nano-Sim, Quality-of-Experience (QoE) Monitor which allows to stream real video sequences inside NS3 and to evaluate the result in terms of video quality through the PSNR and SSIM.

6.5.1/ NANO-SIM

Many network simulators, like SSFNet [START_REF] Nicol | Using simulation to understand dynamic connectivity at the core of the internet[END_REF], OPNET [1], QualNet [3] or J-Sim [START_REF] Ka Čer | J-Sim -a Java-based tool for discrete simulations[END_REF], allow using wireless networks, but the two most used in the research community are NS3 [START_REF] Henderson | 3 project goals[END_REF] and OMNeT++ [START_REF] Varga | An overview of the omnet++ simulation environment[END_REF]. Both of them offer modularity and support for mobility as well as wireless transmission. NS3 is an open source network simulation that is mainly used for education and research in computer communication networks. Simulations are programmed only in C++ while the previous version, NS2, used OTCL and C++. NS3 has various capabilities such as usage of real IP addresses, multiple interfaces per node, it supports BSD-like sockets, and packets can contain real information. NS3 is supported by an active community that works on many topics (groups), and researchers can validate their contribution by comparing the existing ones. Furthermore, only NS3 has a plugin for nano-wireless simulation. Preliminary works have, indeed, been done in Nano-Sim [START_REF] Piro | Simulating electromagnetic-based nanonetworks in the network simulator 3[END_REF], which is a plugin of NS3.

Nano-Sim allows to evaluate Wireless NanoSensor Networks (WNSN) performance. It has been used to test health care applications and comprises three types of WNSN devices:

• Nanonode: It is the smallest device and can be seen as a sensor collecting information such as chemical reaction or multimedia content (sound, image and video). It has limited capabilities in computational, storage and communication range.

• Nanorouter: This device has larger capabilities than a nanonode, it can receive and forward information to the nanointerface or to other nanorouter.

• Nanointerface: This device can be considered as the sink which processes information from sensors. This device can also be used as a gateway to another network, e.g., WiFi, LTE, etc.

The network architecture consists of four layers:

• Application Layer (Message Processing Unit class). This layer has the functionality to generate packets using Constant Bit Rate (CBR) and to receive packets from the lower layer.

• Network Layer. This layer has the functionality of passing (receiving and forwarding) packets between nanosensors and nanorouters to nanointerfaces. A header is added to the packets coming from the application layer. It has five fields: source Id, destination Id, time to live (TTL), packet Id, and tag (packet from sensor or router). There are two protocols for this layer:

-Flooding Routing protocol: the device sends packets to all devices within its transmission range.

-Random Routing protocol: the device select randomly the next hop from its neighbors, which can provide service as point-to-point communications.

In both protocols, to prevent duplicate packets the device keeps a list of 20 received packet Id.

• Medium Access Control (MAC). It provides synchronization among nodes using two strategies. The Transparent MAC method simply transmits packets from the network layer to the physical layer without any control, whereas the Backoff MAC method stores received packet into a queue. It sends the packets when at least one node is in its transmission range. If no other node is in its range, the device applies a random delay prior to starting a handshake procedure.

• Physical Layer.

Given that experiments are impossible to be done in practice and that there is no simulator of video data transmission on nanonetworks, we decided to use the widely used ns3 simulator and two external modules: Nano-Sim and QoE monitor. Nano-Sim1 was written at Technical University of Bari in Italy and simulates very roughly a nanonetwork.

6.5.2/ QUALITY-OF-EXPERIENCE MONITOR

Quality of Experience (QoE) Monitor is an NS3 module which allows to read a video, transmit it using NS3 and reconstruct a valid video file from the received data. It also computes PSNR and SSIM based on the differences between the original video at the transmitter side and the reconstructed video at the receiver side.

At the transmitter side, the video source uses the RTP protocol to fragment the original video into packets. Header information like packet ID, payload size, and timestamps are added. At the opposite side, the video receiver extracts the header from each packet and creates the reconstructed video (video reconstruction). The quality measurement is influenced by the number of dropped packets, the delay and the jitter. In QoE Monitor, the video application is applied to a point-to-point channel and packet loss is determined by the packet loss probability. Dropped packets will cause less received data than transmitted data, which does not allow comparing the video as the reconstructed video will have different number of frames compared to the original video. In order to have the same amount of data and yield a valid video data, the receiver replaces all the lost packets with dummy data [START_REF] Saladino | A tool for multimedia quality assessment in NS3: QoE Monitor[END_REF]. Unfortunately, we met limitations, simplifications and bugs in the two modules unsolved for the moment, for example:

• bug: Nano-Sim does reordering of packets whereas it should not. For example, in a simple network with two nodes (source and destination), sometimes a packet B arrives before a packet A which was sent before B.

• limitation: QoE monitor receiver discards a fragment if the previous fragment has not been received, otherwise said packet reordering leads to packet loss. As such, all packets arriving in disorder are replaced by null data in the received data. Real video clients reorder received packets instead. The end result is that the quality of received video in QoE monitor is less than in reality.

• simplification: Nano-Sim has a very simplistic propagation model (all or nothing), where packets are received if they are inside a circle of some radius from the sender, or lost otherwise.

For all these reasons, we consider our work as a rough but first study on video transmission over nanonetworks.

We used two network topologies for the tests, shown in figure 6. [START_REF] Mathworks | Image Processing Toolbox: For use with Matlab[END_REF]. The first has two nodes, and is used to validate the simulator with the two modules (QoE monitor and Nano-Sim). The second has one source, one destination and 16 relays, and is used to discover how communication is done in a multi-hop network. All the nodes are motionless. The distance between two consecutive nodes is 1 cm. The communication range for all nodes is 1.2 cm, and was chosen so that the network exhibit a connectivity of 4 neighbours, and that there are several hops (more precisely 5 hops) between the sender and the destination, and contention in the network during the communication. The flooding routing protocol and TS-OOK modulation are used.

There is one flow in the network. The video file used as input is the "news" sequence in CIF resolution. The file starts to be sent at second 2. The simulation ends when the file streaming finished. We execute ten times each of the two topologies, and present the results in the following section.

6.5.4/ RESULTS

The PSNR metric between the received video and the sent video for 2-nodes network is presented in figure 6.14. It can be seen that all the executions give similar results. Also, the PSNR has a relatively low value (20 to 35 dB) and is quite regular. No packet is lost on the network; instead the reordering done by Nano-Sim, as presented in previous section, makes QoE monitor drop packets at receiver. The abrupt changes in PSNR plot, appearing at frames 45, 80 and 130, correspond to abrupt scene changes in video file.

The PSNR for 18-nodes network, given in figure 6.15, is similar to the one for 2-nodes and exhibits the same properties.

The SSIM metric for 18-nodes network is presented in figure 6.16. All the executions give similar values. SSIM curve varies much more than PSNR curve. As for PSNR, SSIM curve varies more at abrupt scene changes, but it is less visible, except for frame 130.

The SSIM curve for 2-nodes network is similar to 18-nodes network.

For video transmission, another important parameter is how the packet delay changes, because it fixes the receiver buffer size. The jitter (the difference between packet delays) is presented in figure 6.17. It shows that the jitter varies generally between 30 ns and 70 ns. These values are 3 orders of magnitude lower than what is currently found on Internet, which are of order of tens of ms. As a consequence, the buffers at receiver side could potentially be much smaller than the ones on Internet. However, more importantly, the figure shows that the jitter is identical for all executions, either 2-nodes or 18-nodes. This is an unrealistic result, since in reality the delay and the jitter do depend on the number of hops between sender and receiver (1 hop in 2-nodes, and 5 hops in 18-nodes network). GENERAL CONCLUSION AND FUTURE WORKS 7.1/ GENERAL CONCLUSION Nanonetworks will enable novel applications in diverse fields, such as biomedical, industrial, environmental, costumer good and military field. The development of multimedia nano-components, e.g., nano-camera and nano-phone, allows the generation of multimedia contents at nano-scale. Which in turn paves the way for advanced medical applications, such as displaying human sick organ in holographic form to minimize the surgery process. Enabling multimedia communication in nanonetworks is still a challenging task. It is still a long way to go before having fully functional multimedia nanodevices, but we believe that the current research fosters the process.

In this thesis, we aimed to develop an energy efficient and robust transmission in nanocommunications. Our starting point is the development of energy efficient code to reduce the transmission energy in nanocommunications. Electromagnetic nanocommunications use TS-OOK modulation, which consumes energy only when transmitting bits 1 (silence for bits 0). Therefore, reducing the number of bits 1 is the main purpose of lowweight codes. We have developed two low-weight codes, nanonetwork minimum energy (NME) and new Prakash Gupta (NPG) codes. We investigate the code performance in terms of energy efficiency, bandwidth expansion, information rate after coding, multi-user interference, sequential bits 1 and robustness against transmission error. The proposed codes save energy depending on input data distribution, in some tests more than 50%, and in theory up to 100%. Furthermore, we compare our methods with existing lowweight codes, such as minimum energy (ME), Prakash Gupta (PG), low-weight channel (LWC) and Unary code. The results show that, even if there is no clear winner, NPG and PG have very good performance compared to the others for all criteria used, except in bandwidth expansion.

Multimedia data, especially image and video, tend to have a very large data size. The limited battery capacity in a nanodevice requires energy efficient methods to prolong device lifetime. We have developed a simple and energy efficient image compression (SEIC) to compress an image and reduce the transmission energy in nanocommunications. The method uses a transform coding, DCT or DWT, followed by NME code. We investigate the SEIC performance in terms of energy efficiency and visual quality. Furthermore, we compare our method with well-known image compression standards, namely JPEG, JPEG 2000 and PNG. The simulation results show that SEIC-DWT has the largest energy effi-103 ciency and SEIC-DCT has the best visual quality against transmission error. The trade-off in SEIC-DCT is the larger energy consumption at receiver and in SEIC-DWT the lower image quality.

Reliability is a crucial aspect in data transmission. Electromagnetic nanocommunications will operate at terahertz band, which is characterized by high pathloss attenuation and high molecular noise (vulnerable for data transmission). We have developed simple block nanonode (SBN), which combines NME code and a simple block code. We compare SBN with existing methods to obtain robust transmission in nanonetworks, such as LWC and MEC. The results show that SBN outperforms them in terms of bit error probability (reliability) at the expense of more energy. However, the energy consumption factor is much smaller than the reliability factor.

The reality of multimedia application in nanonetworks should also be investigated in terms of energy availability. We investigate the perpetual operation of nanonetworks using a state of the art energy-harvesting mechanism in nano-battery. The results show that perpetual operation is possible in nanocommunications only in some cases, depending on system parameters such as transmission distance, medium composition, etc. Next, the application of nanodevices in the observed medium may provide the nanodevice with mobility. We investigate the effects of node mobility in terms of pulse time-shift, information reduction, error rate increase and Doppler effect. The results show that pulse time-shift can introduce inter-symbol interference (ISI) for large data transmission, while the movement speed and distance have significant impacts on maximum information rate and achievable bit error rate. Due to the large available bandwidth in the THz band (0.1-10 THz) as well as the large signal bandwidth (4 THz), the Doppler effect is negligible. Moreover, we have developed SERC to obtain energy efficiency and robustness in nanocommunications. SERC is the combination of SEIC-DCT and SBN. The results show that SERC provides energy efficiency up to 80 % and a very small distortion for distances up to 5 m. Furthermore, we investigate the video streaming in nanonetworks using network simulator NS3. We use QoE monitor and Nano-Sim, which are external modules in NS3, and study two parameters of jitter and visual quality (PSNR and SSIM). The results point to several bugs in the software and open the door for realistic nanonetwork simulators.

7.2/ FUTURE WORKS

Our future research directions are as follows:

• First, it is necessary to develop other methods for error correction in nanocommunications, with less complexity but more powerful error correction capability than SBN. Low Density Parity Check (LDCP) is a well-known powerful error correction code. Matrix generator in LDPC has few bits 1, which indicates that the computation for encoding and decoding is simple. The codeword weight can also be minimized with proper design in its matrix generator. A future work is to develop an LDPC code and investigate its performance in energy efficiency, robustness against transmission error, and hardware complexity.

• Terahertz band is characterized by high propagation loss. Power limitation in nanodevices results in short communication distances, e.g., up to a few meters, de-pending mainly on channel composition. THz plasmonic nano-antennas have a very small size, and can be arranged in the form of a Multiple Input Multiple Output (MIMO) antenna system. MIMO can be used to increase the channel capacity and transmission distance. A future work is to propose a MIMO antenna and to investigate its performance in nanocommunications.

• In order to correctly investigate the performance of multimedia communications in nanonetworks, some bugs in QoE monitor and Nano-Sim need to be fixed. In reality, the transport layer in Nano-Sim reorders received packets, but QoE monitor does not, yielding packet losses. In current version, Nano-Sim does not take into account some important terahertz band properties. For example, in Nano-Sim packet loss in channel is given only by the distance between sender and receiver, whereas in reality it can also come from noise in channel. Molecular absorption noise creates errors with certain probability, which makes the receiver drop the packet if there is any error bit. A future work is to correct the bugs and add some properties related to the terahertz communications in NS3.

n École doctorale SPIM 1 rue Claude Goudimel F -25030 Besançon cedex n tél. +33 (0)3 81 66 66 02 n ed-spim@univ-fcomte.fr n www.ed-spim.univ-fcomte.fr

Abstract:

Recently, nanonetworks have attracted the attention of researchers due to their potential applications to monitor event and control matter at nanoscale. Electromagnetic nanocommunications enable wireless communication among nano-machines. The development of nano-cameras and nanophones enable multimedia nanodevices, i.e. generation of multimedia content (scalar data, image and video) at nano-scale. Multimedia content usually has very large data size, while nanodevices have very limited battery capacity. Therefore, reducing the multimedia data size to meet the energy capacity of nanodevices is a challenging issue. Moreover, the observed information from nanodevices should be reliably transmitted to the end-system for accurate data processing.

The development in nano-antennas show that nanonetworks will communicate at terahertz band. Terahertz band is characterized by high path loss and high molecular absorption, which makes it vulnerable for data transmission. Hence, error control is required to obtain reliable data transmission in nanocommunications. In this thesis, we propose various techniques adapted to nanocommunications, i.e. which are simple, energy efficient and reliable. We propose Nanonetwork Minimum Energy (NME) code, Simple and Energy Efficient Image Compression (SEIC), and Simple Block Nanocode (SBN) to obtain energy efficient and robust transmission for nanonetworks. In NME, the most frequent symbols are sent with fewer pulses, using smaller energy. SEIC uses DCT transform followed by NME coding to compress an input image. The compressed images are vulnerable to transmission error, which requires error correction code. SBN uses simple block code followed by NME code to correct the transmission error. Finally, we also investigate multimedia application in nanonetworks, i.e. image and video transmission in nanonetworks from energy point of view. The results show that the proposed methods enable perpetual operation, energy efficient and robust multimedia nanocommunications.

Keywords: multimedia nanocommunications, terahertz band, nanonetworks

R ésum é :

Les nanor éseaux ont r écemment attir é l'attention des chercheurs gr âce à leur applications potentielles sur la surveillance des év énements et le contr ôle de la mati ère à l' échelle nanom étrique. Les communications électromagn étiques permettent la communication sans fil entre des nanomachines. Le d éveloppement des nanocam éras et des nanophones permettent de g én érer du contenu multim édia (notamment vid éo) à l' échelle nanom étrique. Le contenu multim édia a habituellement une tr ès grande taille de donn ées, alors que les nanomachines ont une capacit é limit ée en énergie. Par cons équent, un point important est de r éduire la taille des donn ées multim édia. De plus, l'information doit être transmise de mani ère fiable à l'autre extr émit é. Le d éveloppement des nanoantennes pointent aux fr équences dans le THz, qui est caract éris é par un grand affaiblissement de propagation et grande absorption mol éculaire, rendant la transmission vuln érable aux erreurs. Par cons équent, il est n écessaire d'avoir un contr ôle d'erreurs. Dans cette th èse, nous proposons diff érentes techniques sp écifiques aux nanor éseaux, qui sont simples, efficaces en énergie et fiables. Nous proposons le code Nanonetwork Minimum Energy (NME), une compression Simple and Energy Efficient Image Compression (SEIC), et un code Simple Block Nanocode (SBN) dont le but est d'obtenir des transmissions efficaces en énergie et robustes dans les nanor éseaux. Dans NME, les symboles les plus fr équents sont envoy és avec moins de pulses, utilisant ainsi moins d' énergie. SEIC utilise la transformation DCT suivie de NME pour compresser des images. Ces images sont vuln érables aux erreurs de transmission, qui n écessitent un code correcteur d'erreurs. SBN utilise un code bloc simple suivi de NME pour corriger ces erreurs. Enfin, nous analysons certaines applications multim édia aux nanor éseaux, en particulier la transmission de l'image et de la vid éo dans les nanor éseaux du point de vue énerg étique. Les r ésultats montrent que les m éthodes propos ées sont efficaces en énergie et augmentent la robustesse de la transmission.

Figure 2 . 3 :

 23 Figure 2.3: The working principles of physical, chemical and biological nanosensors [52].

Figure 2 . 6 :

 26 Figure 2.6: Nanopower unit based on piezoelectric effect of zinc oxide nanowires [52].

Figure 2 . 7 :

 27 Figure 2.7: Wireless nanosensor networks for healt monitoring [83].

Figure 2 . 9 :

 29 Figure 2.9: Path loss in terahertz band using the HITRAN molecular composition database [59].

Figure 2 . 10 :

 210 Figure 2.10: Packet collision in multi users TS-OOK modulation [60].

Figure 2 . 11 :

 211 Figure 2.11: The TS-OOK pulses with various pulse energies.

Figure 2 .

 2 Figure 2.12: The TS-OOK spectrum with various pulse energies.

Figure 2 . 13 :

 213 Figure 2.13: The TS-OOK spectrum with various pulse energies.

Figure 2 . 14 :

 214 Figure 2.14: The transition probabilities at terahertz band of 1 fJ TS-OOK pulse.

Figure 2 . 15 :

 215 Figure 2.15: BEP of TS-OOK modulation with various pulse energies.

9 Figure 2 . 16 :

 9216 Figure 2.16: BEP with various Probabilities of bit 1 in TS-OOK modulation.

Figure 2 . 17 :

 217 Figure 2.17: CEP with various codeword size n.

  0...00 → b 11 b 12 ...b 1n 0...01 → b 21 b 22 ...b 2n 0...10 → b 31 b 32 ...b 3n ... 1...11 → b N1 b N2 ...b Nn

  3.1.2.3/ THE BEST 2n-BIT MAPPING IS EQUAL OR BETTER THAN THE BEST n-BIT MAP-PING Theorem. The set of n-bit mappings is a subset of 2n-bit mappings set ⇒ The best 2n-bit mapping is equal or better than the best n-bit mapping. Proof. Suppose the following generic n-bit mapping: 0...00 → b 11 b 12 ...b 1n 0...01 → b 21 b 22 ...b 2n 0...10 → b 31 b 32 ...b 3n ... 1...11 → b N1 b N2 ...b Nn We build the following 2n-bit mapping: 0...00 → b 11 b 12 ...b 1n b 11 b 12 ...b 1n 0...01 → b 11 b 12 ...b 1n b 21 b 22 ...b 2n 0...10 → b 11 b 12 ...b 1n b 31 b 32 ...b 3n ... 1...11 → b N1 b N2 ...b Nn b N1 b N2 ...b Nn where each encoded symbol T of a symbol S is formed by concatenation of the two encoded symbols of n bits corresponding to the first and the second half of the symbol S . For example, if the 2-bit mapping contains 01 → 11 and 10 → 01, we will use 0110 → 1101 in the 4-bit mapping.

Figure 3 .

 3 Figure 3.1: Energy efficiency of NME coding for random data with various probabilities of bit 1.

Figure 3 . 2 :

 32 Figure 3.2: Energy efficiency for codes with various probability of bit 1, in theory.

Figure 3 . 3 :

 33 Figure 3.3: Bandwidth expansion for various codes, in theory (PG is the same as NPG).

Figure 3 . 4 :

 34 Figure 3.4: Information rate for various codes, in theory.

Figure 3 . 5 :

 35 Figure 3.5: Multi-user interference distribution for all codes, in theory.

Figure 3 . 6 :

 36 Figure 3.6: BEP for various codes, in theory.

Figure 3 . 7 :

 37 Figure 3.7: CEP for various codes, in theory.

Figure 3 . 8 :

 38 Figure 3.8: Energy efficiency for various codes for cancer file (LWC is the same as MEC).

Figure 3 . 9 :

 39 Figure 3.9: Information rate for various codes, in cancer file.

Figure 3 . 10 :

 310 Figure 3.10: Probability density function of multi-user interference in nanonetworks for various codes for cancer file.

Figure 3 . 11 :

 311 Figure 3.11: The number of sequential bits 1 for various codes (bottom line corresponds to PG and NPG) for cancer file.

Figure 3 . 12 :

 312 Figure 3.12: The PSNR values (robustness) for various codes for cancer file.

Figure 3 . 13 :

 313 Figure 3.13: The SSIM values (robustness) for various codes for cancer file.

Figure 3 . 14 :

 314 Figure 3.14: Reconstructed image at receiver for various codes for cancer file.

Figure 4 .

 4 Figure 4.1: SEIC application domain.

Figure 4 . 2 :

 42 Figure 4.2: Computation of a one level DWT decomposition [63].

Figure 4 . 3 :

 43 Figure 4.3: Computation of a one level DWT reconstruction [63].

Figure 4 . 4 :

 44 Figure 4.4: Multi-level DWT transform [63].

Figure 4 . 5 :

 45 Figure 4.5: Proposed method: (a) SEIC encoder, (b) SEIC decoder.

Figure 4 . 6 :

 46 Figure 4.6: Visual result of Cancer using SEIC-DCT with various DCT quantization levels Q l .

Figure 4 . 7 :

 47 Figure 4.7: Visual result of Lena using SEIC-DCT with various quantization level Q l .

Figure 4 . 8 :

 48 Figure 4.8: Visual result of Barbara using SEIC-DCT with various quantization level Q l .

Figure 4 . 9 :

 49 Figure 4.9: Visual result of Baboon using SEIC-DCT with various quantization level Q l .

Figure 4 . 10 :

 410 Figure 4.10: Visual result of Cancer with various DWT decomposition levels D l .

Figure 4 . 11 :Figure 4 . 12 :

 411412 Figure 4.11: Visual result of Lena using SEIC-DWT with various decomposition levels D l .

Figure 4 . 13 :Figure 4 . 14 :

 413414 Figure 4.13: Visual result of Baboon using SEIC-DWT with various decomposition levels D l .

Figure 4 . 15 :Figure 4 . 16 :

 415416 Figure 4.15: Visual result of compressed Lena image for various methods.

Figure 4 . 17 :

 417 Figure 4.17: Visual result of compressed Baboon image for various methods.

Figure 4 . 18 :

 418 Figure 4.18: SSIM received Cancer image at various transmission distance.

Figure 4 . 19 :

 419 Figure 4.19: Visual result of received compressed Cancer image for various methods at transmission distance 10 cm.

Figure 5 . 1 :

 51 Figure 5.1: The block diagram of SBN.

Figure 5 . 3 :

 53 Figure 5.3: The decoding circuit for (6, 3) linear block code.

5. 2

 2 .3.2/ DECODER COMPLEXITY SBN decoder consists of Block decoder and NME decoder. NME decoder requires an n bits message register and 2 n × n memory units. The block diagram of Block decoder is shown in Fig. 5.3. The decoder requires m shift registers, mn modulo-2 adders for syndrome computation, 2 m-n AND gates for error patterns and m modulo-2 adders for codeword estimator or corrected output, which is exponential in mn. The decoding time requires two time units (syndrome computation and error correction), which is fast.

Figure 5 . 4 :

 54 Figure 5.4: Bit error probability for MEC.

Figure 5 . 5 :

 55 Figure 5.5: Bit error probability for LWC.

Figure 5 . 6 :

 56 Figure 5.6: Bit error probability for SBN.

Figure 5 . 7 :

 57 Figure 5.7: Reconstructed image at receiver for various codes for cancer file.

Figure 6 . 2 :

 62 Figure 6.2: Nano-battery capacity as function of cylces number [70].

Figure 6 . 3 :

 63 Figure 6.3: Time-shift due to receiver movement during two bit transmission.

Figure 6 . 4 :

 64 Figure 6.4: Signal and PSD of Gaussian pulse and Gaussian monopulse.

Figure 6 . 5 :

 65 Figure 6.5: Information rate reduction during receiver movement.

Figure 6 . 6 :

 66 Figure 6.6: Bit error rate for various receiver speeds.

Figure 6 . 7 :Figure 6 . 8 :

 6768 Figure 6.7: Received signals and their spectrum at various distances. Top: distance 1 mm, middle: distance 1 cm, bottom: distance 1 m.

Figure 6 . 9 :

 69 Figure 6.9: Block diagram of video transmission using SERC.

Figure 6 . 10 :

 610 Figure 6.10: Average SSIM of Foreman for all used method with various distances.

Figure 6 . 11 :

 611 Figure 6.11: SSIM of the first forty Foreman frames for all used methods at distance 3 m.

Figure 6 . 12 :Figure 6 . 13 :

 612613 Figure 6.12: Visual quality of Foreman for all used methods at distance 3 m.

Figure 6 . 14 :

 614 Figure 6.14: The PSNR for 2-nodes network.

Figure 6 . 15 :

 615 Figure 6.15: The PSNR for 18-nodes network.

Figure 6 . 16 :

 616 Figure 6.16: The SSIM for 18-nodes network.

Figure 6 . 17 :

 617 Figure 6.17: The jitter for 2-nodes and 18-nodes networks.

Table 2

 2 Minimum distance d min is used to control robustness; larger d min provides better error correction capability. Assuming that d min is even, minimum codeword size m min is obtained by: m min = Md min /2 (2.34)

	.1.

Table 2 .

 2 1: The hypothetical example used (first two columns) and the mapping table for all compared codes.

	Input sym. Sym. freq. ME NME	PG	NPG	MTE	MEC	LWC Unary
	111	80	000 000 1000000 0000000 1100 0. . . 0011 10010 1
	110	70	001 010 0100000 0000001 0110 0. . . 1100 10001 01
	101	60	010 001 0010000 0000010 0011	.	01100 001
	100	50	100 100 0001000 0000100 1000	.	01010 0001
	011	40	011 101 0000100 0001000 0100	.	01001 00001
	010	30	101 011 0000010 0010000 0010	.	00110 000001
	001	20	110 110 0000001 0100000 0001 0011. . . 0 00101 0000001
	000	10	111 111 0000000 1000000 0000 1100. . . 0 00011 00000001

Table 3 .

 3 3: NME performance for news cif.mp4 file (0.92 MB).

	Coding	Num. of 1s	Num. of 1s Num. of 1s Energy	Dict.	Max dict.
		in dict. (bits) in data (bits) in total (bits) eff. (%) length (byte) length (byte)
	Original	-	-	3,763,743	-	-	-
	NME 2 bit 4	3,735,368	3,735,372	0.76	1	1
	NME 3 bit 12	3,716,347	3,716,359	1.26	3	3
	NME 4 bit 32	3,708,997	3,709,029	1.45	8	8
	NME 8 bit 1,024	3,665,543	3,666,567	2.58	0.25 k	0.25 k
	NME 16 bit 523,358	3,389,503	3,912,861	-3.96	127.8 k	128 k
	NME 24 bit 3,708,769	1,961,620	5,670,389 -50.66	923 k	48 M
	Coding	Num. of 1s	Num. of 1s Num. of 1s Energy	Dict.	Max dict.
		in dict. (bits) in data (bits) in total (bits) eff. (%) length (byte) length (byte)
	Original	-	-	5,607,698	-	-	-
	NME 2 bit 4	5,569,261	5,569,265	0.69	1	1
	NME 3 bit 12	5,392,470	5,392,482	3.84	3	3
	NME 4 bit 32	4,428,079	4,428,111	21.04	8	8
	NME 8 bit 1,024	3,326,281	3,327,305	40.67	0.25 k	0.25 k
	NME 16 bit 271,466	2,372,978	2,590,444	53.81	54.3 k	128 k
	NME 24 bit 1,980,761	1,891,442	3,872,203	30.95	0.5 M	48 M

Table 3 .

 3

4: NME performance for bus qcif.yuv file (1.38 MB).

Table 3 .

 3 5: NME performance for lena.bmp file (65.1 kB).

	Coding	Num. of 1s	Num. of 1s Num. of 1s Energy	Dict.	Max dict.
		in dict. (bits) in data (bits) in total (bits) eff. (%) length (byte) length (byte)
	Original	-	-	260,762	-	-	-
	NME 2 bit 4	245,266	245,270	5.94	1	1
	NME 3 bit 12	252,038	252,050	3.34	3	3
	NME 4 bit 32	223,466	223,498	14.29	8	8
	NME 8 bit 1,024	198,315	199,339	23.56	0.25 k	0.25 k
	NME 16 bit 76,974	131,903	208,877	19.90	19.3 k	128 k
	NME 24 bit 229,518	89,270	318,788	-22.25	57.3 k	48 M
	Coding	Num. of 1s	Num. of 1s Num. of 1s Energy	Dict.	Max dict.
		in dict. (bits) in data (bits) in total (bits) eff. (%) length (byte) length (byte)
	Original	-	-	132,740	-	-	-
	NME 2 bit 4	132,386	132,390	0.26	1	1
	NME 3 bit 12	132,294	132,306	0.33	3	3
	NME 4 bit 32	130,010	130,042	2.03	8	8
	NME 8 bit 1,024	122,955	123,979	6.60	0.25 k	0.25 k
	NME 16 bit 108,405	82,463	190,868	-43.79	26.7 k	128 k
	NME 24 bit 132,011	42,469	174,480	-31.44	33 k	48 M

Table 2

 2

	Coding	Num. of 1s	Num. of 1s Num. of 1s Energy	Dict.	Max dict.
		in dict. (bits) in data (bits) in total (bits) eff. (%) length (byte) length (byte)
	Original	-	-	1,680,819	-	-	-
	NME 2 bit 4	1,518,325	1,518,329	9.67	1	1
	NME 3 bit 12	1,544,009	1,544,021	8.14	3	3
	NME 4 bit 32	1,382,547	1,382,579	17.74	8	8
	NME 8 bit 1,024	1,093,100	1,094,124	34.91	0.25 k	0.25 k
	NME 16 bit 212,215	820,857	1,033,072	38.54	53.7 k	128 k
	NME 24 bit 726,974	596,478	1,323,452	21.26	0.19 M	48 M

.1, energy efficiency and bandwidth expansion for various codes is shown in Table

3

.8.

Table 3 .

 3 7: NME performance for AdobeUpdater.dll file (0.49 MB).

	Code	Number Energy	Number Bandwidth
		of bits 1 efficiency (%) of bits	expansion
	Uncoded 680	0.0	1080	1.0
	ME, NME 390	42.7	1080	1.0
	PG	350	48.5	2520	2.3
	NPG	280	58.8	2520	2.3
	MTE	560	17.7	1440	1.3
	MEC	720	-5.9	5760	5.3
	LWC	720	-5.9	1800	1.7
	Unary	360	47.1	1200	1.1

Table 3 .

 3

8: Energy efficiency and bandwidth expansion of the various codes in the hypothetical example.

Table 3 .

 3

	Code	Energy eff. Bandwidth exp. Seq. bits 1 Multi-user interf. Robustness
	ME, NME	++	++	-	-	++
	PG, NPG	++	--	++	++	+
	MTE	++	-	-	+	+
	MEC	+	--	--	++	++
	LWC	+	-	-	+	+
	Unary	++	+	+	+	--

10: Summary of performance of various codes, both in theory and for cancer file: ++ very good, + good, -bad, --very bad.

Table 4

 4

	Image	Quantization level PSNR (dB) SSIM Energy efficiency ξ (%)
					DCT	SEIC-DCT
	Cancer	10	42.4	0.98	79.3	81.5
	Cancer	30	34.5	0.91	91.2	92.0
	Cancer	50	32.3	0.84	94.8	95.4
	Cancer	70	31.3	0.77	96.6	97.0
	Cancer	90	30.8	0.71	97.5	97.9
	Lena	10	44.6	0.98	89.0	90.0
	Lena	30	37.8	0.93	95.0	95.5
	Lena	50	35.4	0.88	96.7	97.1
	Lena	70	33.9	0.84	97.5	97.8
	Lena	90	33.2	0.80	97.9	98.3
	Barbara	10	43.3	0.98	87.2	88.3
	Barbara	30	36.1	0.93	94.7	95.2
	Barbara	50	34.7	0.87	96.6	97.1
	Barbara	70	33.5	0.81	97.6	97.9
	Barbara	90	32.6	0.78	98.0	98.3
	Baboon	10	42.4	0.98	78.7	80.8
	Baboon	30	34.5	0.90	91.4	91.9
	Baboon	50	32.5	0.82	95.0	95.5
	Baboon	70	31.4	0.74	96.8	97.2
	Baboon	90	30.9	0.67	97.7	98.1

.1. It can be noticed that the larger the quantization level Q l , the larger the energy

Table 4

 4

.1: Energy efficiency, PSNR and SSIM of SEIC-DCT with various DCT quantization levels.

  The energy efficiency and visual quality for Cancer, Lena, Barbara and Baboon images with various decomposition levels D l are shown in Table4.2. The results show that NME code increases the energy efficiency of DWT with only the approximation coefficients. In all cases, SEIC-DWT yields more than 87 % energy efficiency. In SEIC-DWT, the larger decomposition, the larger energy efficiency can be obtained, but the worse the image quality. The visualization of reconstructed Cancer image with various decomposition levels is shown in Fig 4.10.

	Visual Quality Comparison In order to measure the effectiveness of our method, we
	compare SEIC with well known standard image compression such as PNG, JPEG and
	JPEG 2000. SSIM and PSNR for all images are shown in Table 4.3. Lossless com-
	pression PNG has mean SSIM 1 and PSNR ∞ dB, which means perfect reconstruction.

For lossy compression, JPEG 2000 has the largest PSNR and SEIC-DWT has the lowest PSNR for all images. Visual result for Cancer is shown in Fig.

4

.14. It shows that SEIC-DCT has better visual quality than JPEG, since SEIC-DCT uses smaller quantization value. SEIC-DWT image is not perfect, but is visually sufficiently good. This is the price to pay in order to have a simple and energy efficient compression.

Table 4 . 2

 42

	Image	Decomposition level PSNR (dB) SSIM Energy efficiency ξ (%)
					DWT	SEIC-DWT
	Cancer	1	29.4	0.88	79.4	90.5
	Cancer	2	24.1	0.61	93.4	96.5
	Cancer	3	21.4	0.37	97.7	98.5
	Lena	1	34.5	0.96	80.4	88.5
	Lena	2	28.0	0.83	93.6	95.8
	Lena	3	23.6	0.67	97.7	98.2
	Barbara	1	33.4	0.93	80.5	88.4
	Barbara	2	28.4	0.81	93.5	95.7
	Barbara	3	24.2	0.64	97.7	98.2
	Baboon	1	28.9	0.85	80.2	89.7
	Baboon	2	25.2	0.60	93.5	96.2
	Baboon	3	23.1	0.42	97.7	98.4

: Energy efficiency, PSNR and SSIM of SEIC-DWT with various DWT decomposition levels D l .

Table 4 .

 4

		1
		0.8
											BMP
	Average SSIM	0.4 0.6									PNG JPEG 2000 JPEG SEIC-DCT SEIC-DWT
		0.2
		0	0	2	4	6	8	10	12	14	16	18	20
							Distance (cm)

3: Energy efficiency for all compared methods.

Table 5 .

 5 1: Mapping table for SBN(6,3).

	NME bits u Codewords v
	000	000000
	001	011001
	010	111010
	011	100011
	100	110100
	101	101101
	110	001110
	111	010111

Table 5 .

 5 2: Syndrome table for SBN(6,3).

	Syndrome S Error patterns	ê
	000	000000
	100	100000
	010	010000
	001	001000
	110	000100
	111	000010
	011	000001
	101	101000

Table 5 .

 5 3: Energy consumption, BEP and PSNR for cancer image.

	Code	Energy consumption (fJ)	BEP	PSNR SSIM
		T x	R x	T x + R x		(dB)
	Uncoded	293 302	52 429	345 731 2.7 × 10 -2 21.29	0.63
	MEC (16,3,4)	349 526	279 621	629 147 4.2 × 10 -4 35.99	0.98
	MEC (64,5,4)	209 716	671 091	880 807 4.5 × 10 -4 34.68	0.98
	MEC (256,7,4)	149 798 1 917 414 2 067 212 4.3 × 10 -4 34.77	0.98
	LWC (16,3,3)	524 289	279 621	803 910 4.4 × 10 -2 15.17	0.34
	LWC (16,5,3)	314 574	167 773	482 347 4.4 × 10 -2 14.65	0.33
	LWC (16,7,3)	224 697	119 838	344 535 4.4 × 10 -2 14.42	0.32
	SBN (6,3)	500 978	104 863	605 841 1.2 × 10 -3 35.83	0.98
	SBN (16,3)	1 293 177	279 621 1 572 811 2.9 × 10 -5 56.33	0.99
	SBN (16,5)	801 032	167 773	968 856 5.0 × 10 -5 52.88	0.99
	SBN (16,7)	563 899	119 838	683 942 7.5 × 10 -4 38.19	0.99

Table 6 .

 6

	Image	Method	E T x	E R x ξ (%)
	Cancer	Uncoded	293 302	29 330	-
	Cancer	SERC (6,3)	159 929 118 204	45.5
	Cancer	SERC (16,3) 355 912 315 210 -21.3
	Cancer	SERC (16,5) 332 920 189 126 -13.5
	Cancer	SERC (16,5) 270 136 135 090	7.9
	Lena	Uncoded	258 179	25 818	-
	Lena	SERC (6,3)	78 326 118 238	69.7
	Lena	SERC (16,3) 171 844 315 302	33.4
	Lena	SERC (16,5) 152 416 189 182	41.0
	Lena	SERC (16,7) 122 899 135 130	52.4
	Barbara Uncoded	252 769	25 277	-
	Barbara SERC (6,3)	86 567 118 231	65.8
	Barbara SERC (16,3) 200 192 315 282	20.8
	Barbara SERC (16,5) 178 586 189 170	29.3
	Barbara SERC (16,7) 144 889 135 122	42.7
	Baboon Uncoded	265 448	26 545	-
	Baboon SERC (6,3)	150 602 118 204	43.3
	Baboon SERC (16,3) 334 452 315 210 -26.0
	Baboon SERC (16,5) 315 643 189 126 -18.9
	Baboon SERC (16,7) 257 577 135 090	3.0

1: Energy efficiency of SERC for used images.

Table 6 .

 6 2: Energy efficiency of Foreman using SERC.

	Method	T x ( f J) Energy Efficiency ξ (%)
	Uncoded	12 160 570	-
	SERC (6,3)	2 461 045	79.8
	SERC (16,3)	5 475 689	55.0
	SERC (16,5)	4 993 053	58.9
	SERC (16,7)	4 037 698	66.8

  two modules did not work out of the box. We used a NS3 version which worked with QoE monitor, NS3 version 3.16. A first modification was to make QoE monitor work with recent version of libav (a fork of ffmpeg), which is known to change often its API. A second and most difficult challenge was to make Nano-Sim and QoE monitor work together. In both modules, packet sending is done deep inside the module. Our solution was to hack QoE code to replace QoE packet sending with calls to Nano-Sim packet sending. The source code solving these issues is freely available on Internet 3 .

	QoE monitor 2 was written at University of Modena and Reggio Emilia in Italy and features
	an H264-encoded video reader, a valid H264-encoded video writer where lost bytes are
	replaced with null bytes, and PSNR and SSIM quality metric computation.
	6.5.3/ SIMULATION SETUP

The

Downloaded from http://telematics.poliba.it/index.php/en/nano-sim

Downloaded from http://sourceforge.net/projects/ns3qoemonitor

http://eugen.dedu.free.fr/publi/nanocom14/

Mots-cl és : multim édia nanocommunications, bande t érahertz, nanonetworks

This result shows the limits of Nano-Sim module for video transmission.

6.6/ CONCLUSIONS

Wireless nanonetworks consist of numerous nanosensors that cooperate to transmit sensing information to an end-system. The mobility of nanosensor nodes have some effects in nanocommunications. In this chapter, we presented the effects of node mobility in terms of pulse time-shift, information reduction, error rate increase and Doppler effect. The results show that pulse time-shift can introduce inter-symbol interference (ISI) for large data transmission, while the movement speed has significant impacts on maximum information rate and achievable bit error rate. Due to the large available bandwidth in the THz band (0.1-10 THz) as well as the large signal bandwidth (4 THz), the Doppler effect is negligible.

Robust image and video transmission in nanonetworks can be obtained using SERC, which combines SEIC-DCT and SNB. SEIC-DCT compresses image (energy efficiency more than 80 %), then SBN provides reliable transmission in terahertz channel. SERC is able to obtain energy efficiency and 0 error transmission for distance below 1 m.

We presented video transmission over nanowireless networks. We tried to do experiments, but no physical device exists for that. The only possibility to study it is through simulation, using the NS3 well-known network simulator and the QoE monitor and Nano-Sim external modules. PSNR and SSIM quality metrics of the received video, together with jitter graphs have been presented using a 2-nodes and a multi-hop 18-nodes network. This study is the first to tackle video transmission over nanonetworks. It showed the limitation of the current tools and their models. For example, the jitter results of Nano-Sim and the losses at receiver side in case of unordered packets are not realistic. The research in this field needs better models and tools.