CA2500699A1 - Powerline communication system - Google Patents

Powerline communication system Download PDF

Info

Publication number
CA2500699A1
CA2500699A1 CA 2500699 CA2500699A CA2500699A1 CA 2500699 A1 CA2500699 A1 CA 2500699A1 CA 2500699 CA2500699 CA 2500699 CA 2500699 A CA2500699 A CA 2500699A CA 2500699 A1 CA2500699 A1 CA 2500699A1
Authority
CA
Canada
Prior art keywords
uchar
void
define
phy
average
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
CA 2500699
Other languages
English (en)
Inventor
Steve Baril
Eric Lesguillier
Yves Roy
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Domosys Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Domosys Corp filed Critical Domosys Corp
Priority to CA 2500699 priority Critical patent/CA2500699A1/fr
Priority to US11/376,949 priority patent/US8223880B2/en
Priority to EP06721671.3A priority patent/EP1864394B1/fr
Priority to PCT/CA2006/000400 priority patent/WO2006096987A1/fr
Priority to CNA2006800168877A priority patent/CN101176270A/zh
Priority to CN201110076537.2A priority patent/CN102497219B/zh
Priority to CA 2539884 priority patent/CA2539884A1/fr
Publication of CA2500699A1 publication Critical patent/CA2500699A1/fr
Priority to US13/495,575 priority patent/US20120314783A1/en
Abandoned legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B2203/00Indexing scheme relating to line transmission systems
    • H04B2203/54Aspects of powerline communications not already covered by H04B3/54 and its subgroups
    • H04B2203/5404Methods of transmitting or receiving signals via power distribution lines
    • H04B2203/542Methods of transmitting or receiving signals via power distribution lines using zero crossing information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B2203/00Indexing scheme relating to line transmission systems
    • H04B2203/54Aspects of powerline communications not already covered by H04B3/54 and its subgroups
    • H04B2203/5404Methods of transmitting or receiving signals via power distribution lines
    • H04B2203/5425Methods of transmitting or receiving signals via power distribution lines improving S/N by matching impedance, noise reduction, gain control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B2203/00Indexing scheme relating to line transmission systems
    • H04B2203/54Aspects of powerline communications not already covered by H04B3/54 and its subgroups
    • H04B2203/5462Systems for power line communications
    • H04B2203/5491Systems for power line communications using filtering and bypassing

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Cable Transmission Systems, Equalization Of Radio And Reduction Of Echo (AREA)

Description

RHINO
Methode de communication: (Parrallel Charnels) 1 ) Utilise plusieurs canaux de communication sépare dans le temps. Les canaux sont synchroniser sur le courant porteur (60hz ou SOhz selon le cas).
Avantage - Plusieurs noeuds peuvent communique en même temps (sur des canaux différent) sans risque de collisions. Ceci est surtout utile pour les installations électriques ayant plusieurs phases ou pour les routeurs/répéteurs.
- Comme le bruit est souvent plus fort lorsqu'il y a une forte amplitude sur le secteur, il est préférable de communique lorsque l'amplitude est faible. Ceci est possible si le canal est synchronisé sur le « zero-crossing »
- Comme un canal de communication n'utilise qu'une fraction du cycle secteur, l'amplificateur travaille aussi une fraction du temps (low duty-cycle). Il est donc possible de réduire les coûts (amplificateur, power-supply...) - Il est aussi possible d'utilise des fréquences différentes pour chaque canal, ou même alterner des fréquences dans un même canal.
Methode de reception (Différentiel Bit Réception) - Pour chaque bit transmit sur un canal, le transmettew transmet un signal positif et un négatif. Le récepteur calcule la différence de potentiel entre les 2 signaux.
Si la différence est négative, il s'agit d'un 0 sinon d'un 1.
- Donc pour chaque bit 2 mesures sont prises, espace dans le temps mais synchroniser sur le cycle du courant porteur.
- Cette méthode permet d'éliminer les « thresholds » souvent relier a l'utilisation de corrélateurs et d'averager.
- Comme les mesures du signal sont synchroniser sur le cycle du secteur et donc sur le bruit, le différentiel varie peu si il n'y pas as de signal sur la ligne (les
2 mesures sont en faite une moyenne du même bruit). Comme le differentiel varie peu, une infime partie du signal reçu par le récepteur fera varier le differentiel. C'est la methode « balanced » souvent utilise en traitement de signal. Ici on l'utilise dans le temps, alors que cette methode est plus souvent utilise par le hardware Methode de reception (Averaging) - Utilise l'averager afin d'éliminer du bruit et d'éliminer l'impact de «
spikes »
STEVE Mettre + de data ici.
- Signal transmit sur la ligne o Positif : Un sinus qui change de phase a 180 degrés de 1 a n fois pour chaque canal. (le corrélateur est programme pour recevoir 1 changement de phase) o Négatif : Le sinus signal mais qui ne change pas de phase.
- Avantage o Comme une seule fréquence est utilise, il est possible de faire un filtre de réception très étroit.
o Comme le corrélateur est programme pour voir un changement de phase, la corrélation sera forte si le signal positif est transmit est NULLE si le négatif est transmit.
STEVE : Il faudrait faire un exemple de corrélation.

;,
3 ~"~.... 7 ' ..
-t ,~, ~
a._., .;

_ .~,-~w, ; '~'~. : . ~l ~''~
:"

'~ ~ y .,.
'' ~ ~ ~ >

.
~ s~.. ~.., .~ _ V i;. ' ~ v ~

l, ~ ~ ~ ~, ~l W 5.11 \i
4,A

.

i '' ~ ~~ =' r-...,...,....>

~

"~,,-'', CJ ~~" ..." , ..,...7.x ~.",~
, ",'~~'~.w...~.......".7 w.~ ~" ... T ,.:N
~~ ~ '. ~

~. , '.... ~
' w ~, ~~ '' , _._..., ,~5.., ~ .

., i .
; ''~~ ~ ~ 5 W _ .
y ~

. .. . _ ...
w v ~. '~'.~~.- "'fiw:;'.,~} c. "~ i ~- "~ .. C

~....
~.--w-w..i....'r ~,.

' _.,....-. ~ ., .
m ~ '~

~ Si .,._, ,1~ _,__. '~
"~...__._. ~ C

~N
~

. ~V ".
~~''~ ~'r 4 ~ _ ~ ...,.
~ w....

~.~
~

'r r3 ~
.

~ ~

1 t 4c,?
3 .

"

~f 'L
' ..
.

:, ' r.a ~7 ~" "a y v m. , ".....'.7 ... _ v a..3' ~: \, a 5.~~,c'~
> ~~ cs ~.-a... ~.>. ~ ~ ' -~ Lx "~-rte. ~ :~ ' ~~~~ ~ "'.t.~ '~ ~''~' ~; .. ---...~-.
j a ~~
~~ ~ ~ .,.,.".~, ~a ~ "''- v . r.. ~ ~ ~, ~"''~..:."'. ~ --~.....r °"'~",'~.~ ~ M ''~
'~ ~ " .....-.... --~-:S '."~,~' t.
L..~
~"''~t...
°'"'~~.. ~ '"'~. -..a.~w, tue, ',, ,.
,,., -% ~~,~' ~'.~' CS ~ "~' ~ ~ ''~~S ~ '~ ~'' -...fis ~. -rt. ~ -c-",~, ~.~ -.s;
~'' ~
Y w' .""°' '~'~ ~'1, .,.
.- _ ~ ~~." ~, ~.
,.,,,~ ,.;.....,..
,,.. »-....
i ~ ' ~; ~'""~
"'r.
r,:
~, ,~
r ~ ~ ,,, 1. ~ ~~ , ~~,~, y t ~~ '~ ~~
t~
y ~' '~' °~t ra e~
_~.W_~,,:
z ., ,~ w-~ I
.~ ~ .~'~°~ u .,~~"~' :~ :, _ ~, ~
f) fil \, ".'~1 ~ ..-».., ~,~~
a.._ . -,., r~ ;, ,~ ,.. ~,, a y ., ... C
v~ ~' ~ '~ â
., ~"'v y_..:,...~'. % _~''"'~.. ~r '"
,. ''' y, ~~ ,., '-4. 1 -. T"
'°-..~..,....,.~" ,.~~ ~ ..
:r-~' ~ ~--. ~-.~.~.. ............, ''~ ~' ""' ~' ~~ ~ .c .c.'~, ~ -, _ a °' '' j ~~ '~' '' '' '~,.w '' -., -..,-......... -~....w.",~
.. °' c~ t ~.~,'._..~~... -_~..~.---°.
r '~ ~ ~ . ' '~.."
' ~,.3 v '~ r ., --....
d ~'~ ~ t'~ j ~ ~ ,~ ~ ,~~ tu fi s;~ .., ~~ , .., ~ r) ~.,_~
--i~.- ----~-. ~ -.,..
.. ~' -_.-_..,."._~ '1 .
,p "'3, o . '"°r c-'~'~~'- ~....
S~ ..n ' ~ ~ -., _-"~,.
w,,l .. ~.
--......
°-~-.r:... ~ ,~...-~~
_.
~
...._........ --~------------°- "'~
,.
y ' -'~.
y . _~ --...----~._--.:~~-.---_ -,...~
., ~-~-..,~
~" s;~
....",,,,",agi tt ",y ~ ~. /:;;
~.,~ ~ t ~~
-~---~~~." ~ ~a --.-.__. . ~
e ..... ~ ._..
_i ~ M r ,'-~'-,r~ t"w''1 ....-~' ~ ~ ,~''~ .. ,°' ~, '_ ......., 1''A .~ C.~".â ~_.
L~ ~fl~ ~ ~~~ n ~, o I U I m I

U
! 1 I ~d _ I
'S a? .~
.n ~ 8 .6~n ~ I
~ ~
~

! II ~ ~ ~ a zn I
!

I o~ ~ o W O O

~

! I ~~ ~~~ g p Z
'U'~c~~~

' I ~U ~~, H U ~ d I
~H~ ~~ ~ 0 ~ % Q I -~

.._!

! I
I

I

N
I ~ N ~ ~ ,~"" N ~Q ~ O II
NI f'fN N +
~~ ~
~

N ~ I
.-. U ~ fO ~I
U N V I

U , N ~ ~ IC., + I
!

f/7 O ~ ~ N N W ~ ~ i ~ ~
N

- ._ _ +
8 _._. - -.- ' . ~ Jo ~ fn NUD I M (/J S
~
~

~
~
+

i ~ N w I
~ ~ Z
,.~
~
~

I o . J
o N

~ W ~ ? ~ V7I
YYY ~ _ ~
II
+
~

N ~ + ~ J U I1!I
~. ~ v WCOt-O Q J i, N ~~ L~Id - D ~ li " Z $
~"

u~ > I ~
~ ' ~ ~ 'H
~ ~

q ~ ' 0~ _+'+ I

Ii ~_n~_ ,r aI ~ p ~ J~J yyr UUON I
L1 UU2 ~
'. ~==~ ~
~

p ? a zza Q aaQ2Z
I! Q a ~V II
I P N..M~N fD 9NWO>
r- 1~0 ...:. N
~.,~
m N N I

M I
,7 M

p ~
I b v ~ - P] O ~ I
Oy y _ r ~ _ I
~ ~ .-1~M ~ ~ U I
s . '~ ~ Y II
U
+

~ ~ ; I
~ ~
~

U~
I M.. n ~ I
' I
'>
>:.,' trjv.~

~ I
O ~f N
~ U
C

I M
II ~
d I i I ; f I
~izl I
l I. ~ I !: ~ f I ! I
III
I
I i I
II I
j I
I
l I
___ o _____ _L _ ____ Ü _ __~__ _ m ___ __~

_ __.~ -_ __J-___. ° __._- ~ ___ _._.- m____-_.r_J~__~'_ â~ â
â ô ô o ~ â
¿
i_ Q ~ ~ M

I '~ ~ O ..V.,1-I ~ _ ~ K R z ~ ~-~

U z ~~ a I~

p~$Y - ~ I
C _ m ~~'VO G p ~ I
~ ~ ~
f i I "~ A & ~',.. ~ 'i ~~ m ,U
~

II ~ ma o g ' i,, m 'z cf1 -z eW
1 1 W y y S

t. ~
o ~ i n m ~ ~ ~ ~ _ ~ ' -;~ 8 - ~
x R z ~ ~
Q . S I
S a I
. z j ea R
~
~

I, Qlm lm ' ~, 3 n 8 I
i ~ 3 ~
~ 8>
5.~~
~a I ~'S'Lj m o ~
~~ I
7 &n ~

._ ~ ~ a _ m e~

'i ~ ' ~ ~ i~
Q ?

~
P

I ~ fl u.
.. $~
~ 0 i 2 ~
I ~F .~.' l u ~ m ~ !
~
g ,, i v ~

~i~ $ ~ I
I v ~ i 'v~

~

II F _ I ~ c . ~ ill n ~ n ~ ~

ri ~

c v i c ~
M~

j ~= o ' ~

,,, - ~
8 m o m_ >
~

~ ~ ', ~

~ m ~
~

~~ ~~ ~m --_ ~ R :
~ z ~
g" ~
M

i ~ ~
c ~

K

j --_ ___ - <
...__... .__...._ ___.-__U - -_. __...-.

_._._...._.-.-. - __-__- ._.._---._ _...._____.__ . -__......_.

o I ~ I m I
li b~

gdd ~' 0.g i _ ~ ~~~ ~ ~
~ _ 8;~ m ~

U

H
I~~D-~ ~ ~~ _ Z ~~
~~, I

I ~ 3 r~ ~~ ~~ ~ ~~~~ ~ m~ a ~

~ d <~ ~ ~o 0 00 >

8c9~~

I

II
" ~~ ~I~

g ~ m I 2 ~ I I

C II

> ~

, e W.
- ~ ~ '~'R i I
~~ ~~~"

I ~ rjW~

I Z C ~ > ~ ~~
I ~ ~ H ~ '~ R
~' ~m ~ ~ U H
~ W

II_.._ll v.
~ U
I '~

r ~y ~ f. a~
I r-~~

c ~../_z _ ~_ 1 I, ~ . ~' ~ i ' 'I

I I ?

~ g ~ _ ~ ~a$ I
~ ~
I

S ', . . y m' g~

' -c <
i C11 z cl ~ <

s 3 5 h ' ~ ~ m r ! ~ ~ W
s ~' , ~
, ~,~-v~- ~~ a~~
~ --:.~ ~ ~ ~ ~ I
~~~ V ~ Y i 3m II V ~ '.,~ l > > _ V ~ ~

i 2 ~~ ~ _ I ~_~
U

En Sm II
-~G
Y

~ ~
~
~

'. R
I ~
E ~m I

~,~
~~_ n ~ ~ _ G r~. ~ ~ I

': m b5, n- .
G ~C _- V

I ~~~ ~ ~ I

I ~I~ s~~ L

- 8 ~I ',I, "

_. ~~ T

o __ ._ m_-._..._._~~._~
L U I
_..._.__.--.._...___,. ._._._ _._.,-_. -.__.__.. _. 1 t ~ a~
~~~.~.~. j x Z ~ I
!'~~
I
i H
I
h _ ~ ~ _ I
I
.«"~~ 3 a f-u ~ ~ n a ~ w d.
i H M ~
ô
v ~~' ~ iL
y=- a u.
i i ~ ~ ' j ~ c ç ~ 'i i li i ' r V
i I
i I
"_ I
i._...... .---..,._ _. --__-... U - _ m a---_ ..

I ~ i m I <
b T _ In ~
~

~

' ~

o E ,W Z
!
~

z l i ~& ~
~~~
~

r OO
~F

~ gin:

- -- .__--_--U_--. r.-.~
I
', ~U
', i y ~ ~ y I>~ ~~ ~ o ~
x > I~i a~ ~ $.~ .bau a ~ ' I
i 3, ~~~~ ~ ~ ~ .~ ~ I
r~, ~ z z ~i I o ~ ~~ ~ ° ~
zd W O
V
~ ~I Y ~ ,~d N.
I
~jZ °° ~ u~~~QQff F- fn Q' a j E.a. "p~ w8 ~~~~~~~~~iQ
A..C N ~ mU
I ~ o '.. y cc'~ N N t i fcr II

w Q' E l <N
~_ I
~ .., ~ I
N I
M~ ~ ~ J ~ IM
i ° I I
Z ~ v _. ~ ô ~ xi W üJ U
I
I i v~
'. ~- "~ ~ p ~ O
N M~~. ~ ~ O ~!
i II
ill I
I
I
I

phy.c // Includes #include <1AMR(Success)lMasterlhdrlphymain.h>
//#define MASTER
//#define _50HZ_NETWORK
#define ABORT THRESHOLD 0x08 #define SLAVE_ADDRESS 0 //#define SLAVE_ADDRESS 1 //#define SLAVE ADDRESS 2 uchar Slave Counter[3];
#define452KHZ
_ //#define_250KHZ

//#define_133KHZ

//#define_120KHZ

//#define80KHZ

#ifdef _50HZ_NETWORK
#define FIRST_ALTERNANCE_RELOAD_HiGH OxA9 #define FIRST ALTERNANCE RELOAD LOW 0x15 #define SECOND_ALTERNANCE_RELOAD_HIGH Ox9E
#define SECOND ALTERNANCE RELOAD LOW 0x57 // First Interrupt (10 - 1.1 = 8.9ms = A915 II Second Interrupt (10 = ) -// Third Interrupt (1.1 ms = F542) #else #define FIRST_ALTERNANCE_RELOAD_HIGH OxB9 #define FIRST ALTERNANCE RELOAD LOW OxSC
#define SECOND ALTERNANCE RELOAD_HIGH OxAE
#define SECOND ALTERNANCE RELOAD LOW Ox9E
#define THIRD_ALTERNANCE_RELOAD_HIGH OxFS
#define THIRD ALTERNANCE RELOAD LOW 0x42 phy.c // First Interrupt (8.33 - 1.1 = 7.23ms = (65535 - 18083 = B95C)) // Second Interrupt (8.3333 = (65535 - = AE9E)) // Third Interrupt (1.1 ms = F542) #endif #ifdef 452KHZ
#define MDCLK_VALUE 8 #define RECEIVER_NUMBER_OF_SLOT 18 #define TRANSMITTER_NUMBER_OF_SLOT 18 #endif #ifdef 250KHZ
#define MDCLK_VALUE 14 #define RECEIVER_NUMBER_OF_SLOT 12 #define TRANSMITTER_NUMBER_OF_SLOT 12 #endif #ifdef 80KHZ
#define MDCLK_VALUE 14 #define RECEIVER_NUMBER_OF_SLOT 12 #define TRANSMITTER_NUMBER_OF_SLOT 12 #endif #ifdef 120KHZ
#define MDCLK_VALUE 9 #define RECEIVER_NUMBER_OF_SLOT 18 #define TRANSMITTER_NUMBER_OF_SLOT 18 #endif #ifdef 133KHZ
#define MDCLK_VALUE 8 #define RECEIVER_NUMBER_OF_SLOT 20 #define TRANSMITTER_NUMBER_OF_SLOT 20 #endif #define OLD AVG RATIO 6 #define MOD_DEMOD_CLOCK_TICS_IN_ONE_SYMBOL 400 #define SHIFT REGISTER DEPTH 400 #define AVERAGE END ADDRESS

phy.C
(MOD_DEMOD_CLOCK TICS_IN ONE_SYMBOL * 2 - 1 ) #if ((AVERAGE_END ADDRESS & 1 ) != 1 ) #error The least significant bit of AVERAGE_END ADDRESS must be 1.
#endif // 1 ms #define THO_RELOAD_VALUE OxF6 #define TLO RELOAD VALUE 0x45 #define T2_AUTO_RELOAD_VALUE OxFFFO
#define SMOD BIT MASK 0x80 #define SPIAS_BIT_MASK0x80 #define SPIE_BIT_MASK0x40 #define SPIM_BIT_MASK0x10 #define SPICP_BIT_MASK0x08 #define SPICPH_BIT_MASK
0x04 #define SPIR1_BIT_MASK0x02 #defrne SPIRO BIT 0x01 MASK

#define TX_MODE 1 #define RX MODE 0 bit Enable Zero Crossing;
void Interface (void);
uchar GetEndSeIForLastBitPosition (data uint *Last Bit_Position);
void TransmitWaveForm (void);
void TransmitWaveFormB (void);
void AddBitToShiftRegister (void);
void BitPostProcessing (void);
void StartRx (void);
void StartTx (void);
void PhyMenu (void);
void SendString (uchar *String);
void SendHexValueOfByte (unsigned char Byte);
void HuiPutNibble(uchar value);
void HuiPutHex(uchar value);
void InitSpi (void);
void PowerNet (void);

void PBPhaseDetectlnitialize (void);
uchar ConfigureDemodulator(void);
phy.c bit First Alternance;
bit Secônd_Alternance;
bit First Reception;
bit Enable_State_Machine;
bit Slot State;
idata uchar Number_Of_Rx_Interrupts;
uint Tx_Wait_Slot;
bit MACS_MODE;
uchar Listen_Delay;
//#ifndef ACQUISITION
unsigned char Total Count;
unsigned char Total~_Rx_Count;
xdata uint Bits_vs_Average Shit Register[48];
data uint Synch_Pattern;
idata uchar Skip Verify;
idata signed int Signal_Amplitude;
uchar Current_Slave_Address;
bit New Bit_Detected;
uchar Phy_Frame_Data[6] _ {OxA6, ~OxA6, 0x65, ~0x65, 0x87, ~0x87};
const uchar MASTER_COMMAND[4] _ {OxA6, ~OxA6, 0x65, ~0x65};
uchar xdata *Tx Buffer;
uchar Phy_Frame_Length = 48;
data uchar Tx Amplitude = 100;
data signed int Mylnt;
idata uchar Number Of Slots;
uchar Threshold_Flâg;
idata uchar Quit = 0;
idata uchar Carrier Lost = 0;
idata uchar Max_Bit Sum = 0;
idata uchar Bit_Thréshold = 0;
idata uchar Max_Value = 0;
idata uchar Current Symbol = 0;
idata uchar Symbo¿_Detected = 0;
idata uchar First_Bit = 0;
unsigned char IntOffset = 0;
data uchar Byte;
data uchar Byte1;
data uchar xdata *Ptr;
xdata uchar value;
uint Delay ;
uchar PhysLPacketTxPending;
data uchar MACS State;

phy.c uchar Peak = 0;
uchar Treshold = 0x30;
data vint Xdata_Ptr;
data uint Byte_Ptr;
data uint Byte_Ptr2;
bit Packet_To_Transmit;
uchar Output_Command;
idata uint Average_Peak;
idata vint Temporary Peak;
data uchar Peak_Count;
data uchar IntByte;
uchar Tx_Done = 0;
data uint Bit_Received;
data uchar Bit_Flag;
data uint Address;
xdata uchar Current_Frame[100];
bit Last_Symbol_To_Transmit;
idata uchar Symbol = 0;
#pragma memory =dataseg(COMM_RAM) II uchar Waveform D[400];
// uchar Waveform C[400];
uchar Waveform B[400];
uchar Waveform A[400];
uchar Waveform_C[400];
// #define Waveform B Waveform A
#pragma memory = dataseg(AVERAGER) uchar Average[800];
#pragma memory = dataseg(CORRELATION_WINDOW) uchar CorWA[200];
#pragma memory = default /I uchar Post Average[400];
#ifdef _250KHZ
#include <1AMR(Success)\Master\srclWaves 250.c>
#else #ifdef _452KHZ
#include <\AMR(Success)\Master\src\Waves 452.c>
#else #endif #endif phy.c #include <\AMR(Success)\Master\src\Waves 80.c>
// Includes #include <\AMR(Success)\Master\src\phyutils.c>
void InitializeSpreadModem (void) #ifdef MASTER
MACS_MODE = TX_MODE;
Tx Buffer = Phy_Frame Data;
AVERAGE_COEFFICIENT = 0;
#else #endif MACS_MODE = RX_MODE;
Tx Buffer = Phy_Frame Data;
for (Mylnt = 0; Mylnt < 400; Mylnt++) Waveform A[Mylntj = (((ROM_WaveForm Ratio_Flip[Mylntj - 128) Tx_Amplitude) / 100) + 128;
Waveform B[Mylnt] _ (((ROM_WaveForm_Ratio_Flip[Mylnt]- 128) Tx_Amplitude) / 100) + 128;;/* ROM_WaveForm 7040[Mylnt];*/
Waveform C[Mylnt] _ (((ROM_WaveForm_Ratio_Zeros[Mylnt]- 128) Tx Amplitude) / 100) + 128;;/* ROM WaveForm_7040[Mylnt];*/
PBPhaseDetectlnitialize ();
ConfigureDemodulator Q;
MDCLK = MDCLK VALUE;
New Bit Detected = 0;
THRESHOLD_FLAGS = THRESHOLD_FLAGS;
AVERAGE,THRESHOLD = OxFF;

phy.C
CORRELATION THRESHOLD = OxFF;
THRIF = 0;
ETH R = 1;
EMO = 1;
TransmitWaveForm ();
MOTX = 1;
InitSpi ();
P4 DIR = 0x00;
#ifdef MASTER
Phy_Frame Length = 32;
#endif P1_DIR &_ (OxFF - 0x08);
P1.3 = 1;
Enable State Machine = 1;
Enable Zero Crossing = 1;
void PBPhaseDetectlnitialize(void) // Priority Extrnal low .
PX1 = 0;
// Enable Externat EX1 = 1;
// Falling edge IT1 = 1;
// Put in Timer Mode TMOD &= OxOF;
TMOD ~= 0x10;

phy.c II Turn ON timer/counter T1 TR1 = 1;
II Enable timer/counter T1 interrupts.
ET1 = 1;
void SpreadPhyController (void) f static uchar Bit_Number = 0;
static uchar Bit Mask = 0;
P1.3 = 1;
ES = 0;
if (New Bit Detected) New Bit Detected= 0;
ES = 0;
Average_Peak = 0;
II Get the Peak withing the average.
for (Xdata_Ptr = 0; Xdata Ptr < (796);Xdata_Ptr+= 2) II Get the 10-bits average Temporary Peak = ((*(uchar xdata *)Xdata_Ptr) 16) + (((*(uchar xdata *)Xdata_Ptr + 1 )) & OxOF);
if (Temporary_Peak > Average_Peak) f Average_Peak = Temporary_Peak;
i // TI = 0;
// SBUF = Byte1;
AddBitToShiftRegister ();

phy.c #ifdef MASTER
if (Listen_Delay) Listen Delay--;
if (!Listen_Delay) II We have 1 chance to receive all the data...
BitPostProcessing ();
Current Slave_Address++;
if (Current Slave Address == 3) _ _ Tx Buffer = Phy_Frame_Data;
MäCS_MODE = TX_MODE;
Phy_Frame_Length = 32;
AVERAGE_COEFFICIENT = 0;
Current Slave Address = 0;
esse f Listen_Delay = 48;
) #else BitPostProcessing ();
#endif i PowerNet ();
) void TransmitWaveForm (void) MOSTRL = (uchar)Waveform A;

phy.C
MOSTRH = (uchar)((uint)Waveform A » 8);
MOENDL = (uchar)(Waveform A + 397);
MOENDH = (uchar)((uint)(Waveform_A + 397) » 8);
void TransmitWaveFormB (void) MOSTRL = (uchar)Waveform B;
MOSTRH = (uchar)((uint)Waveform B » 8);
MOENDL = (uchar)(Waveform B + 397);
MOENDH = (uchar)((uint)(Waveform_B + 397) » 8);
void TransmitWaveFormC (void) MOSTRL = (uchar)Waveform C;
MOSTRH = (uchar)((uint)Waveform C » 8);
MOENDL = (uchar)(Waveform C + 397);
MOENDH = (uchar)((uint)(Waveform_C + 397) » 8);
uchar GetNextSymbol (void) uchar Temp_Byte;
Temp Byte = Tx Buffer[Symbol / 8];
Temp Byte »= 7 - (Symbol & 0x07);
Symbol++;
Last Symbol To_Transmit = 0;
if (Phy_Frame_Length == Symbol) f Last Symbol To_Transmit = 1;
return (Temp_Byte & 0x01 );

phy.c void PowerNet (void) f #ifndef MASTER
//#define RECEIVER
static uint Previous Rx Count = OxFF;
if (Total Count != Previous_Rx Count) f Previous Rx Count = Total Count;
HuiPutNibble (Previous Rx Count / 10);
HuiPutNibblé (Previous_Rx_Count - (((uchar)(Previous_Rx Count / 10)) * 10));
#endif i #define SYNCH PATTERN Ox55A6 #ifdef MASTER
#define RX_COMMAND_LENGTH 48 #else #define RX COMMAND LENGTH 32 #endif void AddBitToShiftRegister (void) ( // Add this average to the 32-bits (byte) shift register.
for (Byte = 0; Byte < RX COMMAND LENGTH - 1; Byte++) Bits_vs_Average Shit_Register[Byte] _ Bits vs Average Shit Register[Byte + 1];
Bits vs Average Shit Register[RX COMMAND LENGTH - 1] = Average_Peak;

phy.c i void BitPostProcessing (void) uchar Rx_Frame[6];
vint Average_Amplitude;
uchar Amplitude Nbr;
if (Skip Verify) f Skip_Verify--;
i else f if (!Skip_Verify) Average Amplitude = 0;
Amplitude_Nbr = 0;
+= 2) for (Byte1 = 0; Byte1 < (RX_COMMAND_LENGTH / 8); Byte1 f Synch_Pattern = 0;
for (Byte = 0; Byte < 8; Byte++) f Synch_Pattem = Synch Pattern * 2;
Signal Amplitude =
Bits vs Average_Shit Register[Byte + (Byte1 * 8)] - (Bits vs Average Shit Register[Byte +
8 + (Byte1 * 8)]); _ -Amplitude Nbr++;
ABORT THRESHOLD) if (Signal Amplitude >
i Synch Pattern ~= 1;
Signal Amplitude;
Average Amplitude +_ else phy.c if (Signal Amplitude < 0) Signal Amplitude =
Signal Amplitude * -1;
Signal Amplitude;
Average Amplitude +_ ABORT THRESHOLD) if (Signal_Amplitude >
i else f #ifdef MASTER
if (!Byte1 ) f TI = 0;
SBUF = OxEA + Current Slave Address;
while (!TI);
TI = 0;
SBUF = 0x00; // No Answer while (!TI);
TI = 0;
SBUF = Average_Amplitude / 8 / Amplitude Nbr;
while (!TI);
else // Carier Lost TI = 0;
SBUF = OxEA + Current Slave Address;

phy.c while (!TI);
TI = 0;
SBUF = 0x01; // No Answer while (!TI);
TI = 0;
SBUF = Average Amplitude / 8 / Amplitude Nbr;
while (!TI);
#endif // Bad BiT!!
return;
) i #ifndef MASTER
if (Synch_Pattern != MASTER_COMMAND[Byte1]) f if (Byte1 != 0) f T1 = 0;
SBUF = OxE1;
while (!TI);
TI = 0;
SBUF = Average Amplitude /
8 / Amplitude Nbr;
while (!TI);
i // Bad Byte!
retu rn;
#endif #ifdef MASTER

phy.c if (Byte1 == 0) ( if ((Synch_Pattern & OxEO) != OxEO) TI = 0;
SBUF = OxEA +
Current Slave Address;
8 / Amplitude Nbr;
while (!TI);
TI = 0;
SBUF = 0x00; // Carrier Lost while (!TI);
TI = 0;
SBUF = Average_Amplitude while (!TI);
// Bad Start Byte return;
Rx Frame[Byte1 / 2] = Synch Pattern;
Amplitude Nbr;
#end if #ifdef MASTER
// We have received all the bits...
// we must validate the checksum.
if (Rx Frame[2] !_ (uchar)(Rx Frame[0] + Rx_Frame[1])) f Tf = 0;
SBUF = OxEA + Current_Slave_Address;
while (!TI);
TI = 0;
SBUF = 0x02; // Bad Checksum while (!TI);
TI = 0;
SBUF = Average Amplitude / 8 /
while (!TI);
TI = 0;

phy.c // Bad Checksum return;
#endif #ifdef MASTER
TI = 0;
SBUF = OxAA + Current_Slave Address;
while (!TI);
TI = 0;
SBUF = (Rx Frame[0] & 0x07) + 1; //
Signal Quality while (ITI);
TI = 0;
Byte = ((Rx_Frame[1] & 0x80) » 6);
Byte ~_ ((Rx Frame[O] & 0x08) » 3);
SBUF = Byte; // Buttons while (!TI);
TI = 0;
SBUF = Rx_Frame[1] & Ox7F;
while (ITI);
TI = 0;
Average Amplitude / 8 / Amplitude Nbr;
Average Amplitude =
if (Average_Amplitude > 255) f Average Amplitude = 255;
SBUF = Average Amplitude;
while (!TI);
switch (Current Slave Address) case 0:
Slave Counter[0]++;
HuiPutHex (OxAO +
Slave Counter(O] % 0x08);

phy.c break;
case 1:
Slave Counter[1]++;
Slave Counter[1] % 0x08);
HuiPutHex (OxBO +
break;
case 2:
Slave Counter[2]++;
Slave Counter[2j % 0x08);
HuiPutHex (OxCO +
break;
i #endif #ifndef MASTER
TI = 0;
SBUF = OxA1;
while (!TI);
Average Amplitude = Average Amplitude / Amplitude Nbr;
TI = 0;
SBUF = Average Amplitude » 8;
while (!TI);
TI = 0;
SBUF = Average Amplitude;
while (!TI);
#endif if (P4 & 0x80) P4 &_ -0x80;
else ( P4 ~= 0x80;

phy.C
// Good Frame!
Total Count = Total Count + 1;
if (Total Count == 99) Total Count = 0;
#ifndef MASTER
Byte = Average Amplitude / 128;
if (Byte > 7) f Byte = 7;
#ifndef MASTER
uchar Signal_Quality;
Signal Quality = OxFF - OxCO;
P4 &_ --Signal_Quality;
Signal Quality = Signal Quality » (7 - Byte);
P4 ~= Signal Quality;
#endif if (P0.3) Byte ~= 0x08;
Phy_Frame Data[0] = OxEO ~ Byte;
Phy_Framé Data[1] _ ~Phy_Frame_Data[0];
if (P0.4) phy.c Phy_Frame Data[2] = Total Count ~ 0x80;
else Phy_Frame Data[2] = Total Count;
Phy_Frame_Data[3] _ ~Phy_Frame_Data[2];
Phy_Frame Data[4] = Phy_Frame Data[0] +
Phy_Frame Data[2];
Phy_Frame_Data[5] _ ~Phy_Frame Data[4];
Tx Wait Slot = 48 * SLAVE ADDRESS;
Tx_Buffer = Phy_Frame Data;
MACS_MODE = TX_MÖDE;
Phy_Frame Length = 48;
AVERAGÉ COEFFICIENT = 0;
// Do not need to process packet for the next slots...
Skip Verify = 48 * (2 - SLAVE ADDRESS);
#endif // Skïp Verify = 32;
} // Skip Verify void StartTx (void) if (Tx_Wait Slot) f Tx_Wait Slot--;
return;
P4 ~= 0x40;
Number Of Slots = TRANSMITTER_NUMBER OF SLOT;

phy.c Current Symbol = GetNextSymbol ();
if (Current Symbol) f TransmitWaveFormB ();
MODIR = 0;
MOPHS = 0;
MOTX = 1;
else TransmitWaveFormC ();
MODIR = 0;
MOPHS = 0;
MOTX = 1;
void StartRx (void) // P1.3 = 1;
DEMODIF = 0;
// CWENDL = CWENDL;
IntByte = DMSTA ;
// AVERAGE_COEFFICIENT = (OLD_AVG_RATIO « 3) + 7;
AVERAGE_COEFFICIENT = 0;
/I Start Averager and coreletor DEMODULATOR_CONTROL_1 &_ (OxFF - (CRRST BIT MASK ~
DMRST_BIT MASK));
Number Of Rx Interrupts = RECEIVER NUMBER_OF SLOT;
First Reception = 0;
// Enable Demodulator interrupt.
EDEMOD = 1;
i *******************************************************************************
***********

phy.c // *************************** INTERRUPTS!I
************************************************
//
*******************************************************************************
***********
// TRANSMITTER INTERRUPT
interrupt [MODULATOR ISR_VECTOR] using [2] void Modulatorlsr(void) f MODIF = 0;
if (Number Of Slots) Number Of Slots--;
MOTX = 1;
) else f if (Last Symbol To_Transmit) f P4 &_ ~Ox40;
Symbol = 0;
Last_Symbol_To_Transmit = 0;
// Switch to RX MODE
MACS_MODE = RX MODE;
#ifdef MASTER
Listen_Delay = 48;
#endif i // RECEIVER INTERRUPT
interrupt [DEMODULATOR_ISR VECTOR] using [2] void DeModulatorlsr(void) // P4 ~= 0x02;

phy.c DEMODIF = 0;
// CWENDL = CWENDL;
IntByte = DMSTA ;
if (IntByte & 0x01 ) ( if (!First Reception) _ First Reception = 1;
/l Start Averager!
AVERAGE_COEFFICIENT = (OLD AVG_RATIO « 3) + 7;
return;
if (Number Of Rx_Interrupts) ( _ _ Number Of Rx Interrupts--;
if (!Number Of Rx Interrupts) ( ~ _ // Stop interrupt EDEMOD = 0;
// Stop averager we have reach the limit.
DEMODULATOR_CONTROL_1 ~_ (CRRST BIT MASK ~ DMRST BIT MASK);
// Process BIT.
New Bit Detected = 1;
// P1.3=0;
// THRESHOLD INTERRUPT (NOT USED) interrupt [fHRESHOLDS_ISR_VECTOR] using [1] void Thresholdslsr(void) f THRIF = 0;
phy.c Threshold Flag = THRESHOLD_FLAGS;
interrupt[0x1 B] void PBPhaseDetectTimer1 Interrupt (void) EX1 = 1;
I/ Maximum Resolution if (!First Alternance) First Alternance = 1;
// Prepare the next alternance...
TH1 = SECOND_ALTERNANCE_RELOAD_HIGH;
TL1 = SECOND ALTERNANCE RELOAD_LOW;
}
else // We need to reenable the zero-crossing detector Enable Zero Crossing = 1;
// The timer expired.
// This is the slot...
// we must listen or transmit...
if (MACS_MODE == RX_MODE) StartRx ();
}
else // Tx Mode StartTx ();
} // Rx Mode }
interrupt[0x13] void PBPhaseDetectExt1lnterrupt (void) phy.C
if (Enable Zero Crossing) if (TH 1 == 0) f // The timer was stopped?
// must restait it.
// Put in Timer Mode TMOD &= OxOF;
TMOD ~= 0x10;
// Priority Extrnal low .
PX1 = 0;
// Falling edge IT1 = 1;
// Enable timer/counter T1 interrupts.
ET1 = 1;
// Turn ON timer/counter T1 TR1 = 1;
// We have just received an interrupt...
// we must restait the timer.
// EX1 = 0;
EA = 0;
TH1 = FIRST_ALTERNANCE_RELOAD_HIGH;
TL1 = FIRST_ALTERNANCE_RELOAD LOW;
EA = 1;
First Alternance = 0;
Enable Zero Crossing = 0;
interrupt [0x08] using [2] void timer1 int(void) f A
phy.c THO = THO_RELOAD VALUE;
TLO = TLO_RELOAD -VALUE;
#endif
CA 2500699 2005-03-16 2005-03-16 Powerline communication system Abandoned CA2500699A1 (fr)

Priority Applications (8)

Application Number Priority Date Filing Date Title
CA 2500699 CA2500699A1 (fr) 2005-03-16 2005-03-16 Powerline communication system
US11/376,949 US8223880B2 (en) 2005-03-16 2006-03-16 System and method for power line communication
EP06721671.3A EP1864394B1 (fr) 2005-03-16 2006-03-16 Systeme et procede de communication sur ligne d'alimentation
PCT/CA2006/000400 WO2006096987A1 (fr) 2005-03-16 2006-03-16 Systeme et procede de communication sur ligne d'alimentation
CNA2006800168877A CN101176270A (zh) 2005-03-16 2006-03-16 用于电力线通信的系统和方法
CN201110076537.2A CN102497219B (zh) 2005-03-16 2006-03-16 用于电力线通信的系统和方法
CA 2539884 CA2539884A1 (fr) 2005-03-16 2006-03-16 Systeme et methode de communications par ligne electrique
US13/495,575 US20120314783A1 (en) 2005-03-16 2012-06-13 System and method for power line communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CA 2500699 CA2500699A1 (fr) 2005-03-16 2005-03-16 Powerline communication system

Publications (1)

Publication Number Publication Date
CA2500699A1 true CA2500699A1 (fr) 2006-09-16

Family

ID=36998149

Family Applications (1)

Application Number Title Priority Date Filing Date
CA 2500699 Abandoned CA2500699A1 (fr) 2005-03-16 2005-03-16 Powerline communication system

Country Status (2)

Country Link
CN (1) CN101176270A (fr)
CA (1) CA2500699A1 (fr)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011091791A (ja) * 2009-09-24 2011-05-06 Toyota Central R&D Labs Inc 移動体用電力線通信方法
CN101788607B (zh) * 2009-12-28 2011-12-28 江苏省电力公司苏州供电公司 低压相序相位仪及其检测方法
CN101788614B (zh) * 2009-12-28 2012-07-25 江苏省电力公司苏州供电公司 高低压综合相序相位仪及其检测方法
CN101741428B (zh) * 2010-01-12 2013-09-11 国电龙源电气有限公司 一种电力线载波通讯调制、解调方法
EP2400663A1 (fr) * 2010-06-17 2011-12-28 Vetco Gray Controls Limited Circuit d'alimentation électrique en CA
US20120263252A1 (en) * 2011-04-12 2012-10-18 Texas Instruments Incorporated Systems and Methods of Power Line Transmission of Solar Panel Data
JP6006958B2 (ja) * 2012-03-28 2016-10-12 株式会社メガチップス 通信システム、通信装置および通信システムの動作方法
JP6990886B2 (ja) * 2016-12-09 2022-01-12 パナソニックIpマネジメント株式会社 電力伝送システム
CN110278008B (zh) 2018-03-16 2021-05-04 华为技术有限公司 一种电力线通信方法、装置及计算机存储介质
CN113992242B (zh) * 2021-10-28 2023-03-21 重庆邮电大学 一种plc系统帧载荷的软信息合并方法

Also Published As

Publication number Publication date
CN101176270A (zh) 2008-05-07

Similar Documents

Publication Publication Date Title
CA2500699A1 (fr) Powerline communication system
CN101107788B (zh) 用于电力线通信的方法和设备
US7529308B2 (en) Communication apparatus and communication method using digital wavelet multi carrier transmission system
JP5461589B2 (ja) 遅延検波回路および受信装置
US20020012401A1 (en) Transducer network bus
US20020039388A1 (en) High data-rate powerline network system and method
CN108173799B (zh) 一种基于频域处理的电力线载波通信方法
Majhi et al. Blind symbol-rate estimation and test bed implementation of linearly modulated signals
CN109361634A (zh) 接收机载波频偏的补偿方法及系统
CN103023533B (zh) 一种双频率电力线载波通信方法
CN101800602B (zh) Dqpsk解调器偏置点控制方法及装置
KR100336638B1 (ko) 비동기 전력선 전송장치
CN1750432B (zh) 天线方向调整方法和ofdm接收装置
Su et al. A robust underwater acoustic communication approach for pipeline transmission
ATE171324T1 (de) Empfänger mit klemmschaltung und entsprechendes optisches kommunikationsnetz
JP5267514B2 (ja) 電力線通信装置、集積回路、及び電力線通信方法
Diao et al. Loudspeaker operation status monitoring system based on power line communication technology
Keegan Digital & Analog Implementations of Visible Light Communication
CN108055220A (zh) Ask幅度自适应抗噪声解调算法及装置
JP5480302B2 (ja) 遅延検波回路および受信装置
Bondariev et al. Comparative analysis and ways of improvement of noise immunity of demodulation of OQPSK signals
JP2003520492A (ja) ワイヤレスデジタル高速通信
JP2003046479A (ja) トランスデューサネットワークバス
US8710695B2 (en) System and method for passing PLC signals from a first electrical line to a second electrical line
CN112383327A (zh) 载波交直流通信方法

Legal Events

Date Code Title Description
FZDE Discontinued
FZDE Discontinued

Effective date: 20080319