How to share files between Windows and Xubuntu

Okay,this is a instructional tutorial,Follow the instruction step by step ,and you will make it!
1.Install samba and smbfs.
sudo apt-get install samba smbfs
2.Install fusesmb,this will make thing easier to browser network places in Thunar.
sudo apt-get install fusesmb
However, in order to use it, it is necessary to add in the fuse modules loaded at startup:
sudo sh -c "echo fuse >> /etc/modules"
If you want to enjoy it without restarting:
sudo modprobe fuse
3.Add users can use FUSE fuse in the group, for example:
sudo adduser hongjun fuse
4.Once the fuse module loaded (modprobe fuse or reset), the module is materialized by / dev / f use, but the default rights are not correct.
sudo chgrp fuse /dev/fuse
4.Create a folder that you want mount the LAN network resources to:
sudo mkdir /media/network
sudo chmod 777 /media/network
5. Use the command below,and work done!
fusesmb /media/network
cd to /media/network and you will see shared resoureces in your LAN,using
fusesmb.cache to refresh hosts.

Blogspot now support vedio upload

so far so good!















Nearly 10 days of coding,the two-stage matrix converter works now.The DSP(TMSLF2407A) code is written in C,which is portable to other target CPU such as 2812 or the newly came out high performance 2833.For the specific feature of matrix converter,we can not use the svpwm module of 2407,because in two-stage matrix converter,the rectifier-stage is not the same as 3-phase voltage boost pwm rectifier which applies the svpwm modulation.Actually it is current type rectifier.Although the inverter-stage applies the svpwm modulation strategy,for the sake of zero-current commutation,the svpwm modulation strategy is a little more complex----which has to be divided into two parts.The event manager of 2407 does has svpwm generator,but it can not satisfy our design.No other way,we choose CPLD to generate pwm gate signals.CPLD code is written in VHDL.Pictures listed left are screen shot of gate signals of leg A of rectifer-stage and phase-phase gate signal of inverter stage.Modulation duty-cycle is 400us,which is 2.5Kilo Hz.The svpwm reference voltage 25HZ.

I got cold again!

God damned,I got cold twice in a month.This time is sicker than last time.I can not breath with my nose,and heart-beat rate is twice faster than normal.My mind is messed up,I do not want to think,I do not want to talk,my mouth is thirsty all the day.My eyes are reluctant to open.I am suffering!!!God save me!Mom,I miss you so much!

My blogspot template modified

I got my blogspot template modified.It looks nice for me.Green is my favorite color which is the symbol of life and peace.It keeps my mind serene.Basically,I imitated the MSN livespace template,try to get this site the same style as my Livespace.

Music collection

1.The Sound Of Silence


2.Girlfriend


3.The Best Damn Thing


4.She


5.Patience


Music links are from http://leox.lifelogger.com/

Using Skin++ to change your app's face

Skin++ is a powerful software that can change your windows GUI apps' face.So you can focus your mind most on your app's algorithm and care less about the appearance.Skin++ do all the left job for you.Skin++ is easy to use,there is only four steps you need to do:

Step 1:
Download Skin++,and setup.(PS:Skin++ is not a free software,but you can find the crack file.Using google.)

Step 2:Create a new MFC or Win32 project from VC.(I use VC6.0 as my development tool)

Step 3:From the Skin++ installation folder,copy SkinPlusPlus.h, SkinPlusPlusDLL.lib, XPCorona.ssk, SkinPlusPlusDLL.dll to your project folder.Note XPCorona.ssk is a skin file,you can change it to get different skin style.

Step 4:Add the following code to your xxxx.h:
#include "SkinPlusPlus.h"
#pragma comment(lib,"SkinPlusPlusDLL.lib")
Add the following code inside the InitInstance member function of CxxxApp class:
InitializeSkin(_T("XPCorona.ssk"));

Step 5:compile and run.Your program's face changed!

Note:Because your program load the SkinPlusPlusDLL.dll file dynamically at the run-time,you need to keep this file the same folder as your exe file or in system folder.If you want to keep all-things just in one exe,you can try MoleBox.

Enable Accelerator for Dialog Application in MFC(HowTo)

(This method is from Microsoft MSDN)
1.Add the class member variable accelTable to your Dialog class:
HACCEL accelTable;

2.Add the code below in the According Dialog constructor:
accelTable = LoadAccelerators(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_ACCELERATOR1));

3.Press Ctrl+W to open class-wizard,in the object IDs column,choose your dialog,then double click the PreTranslateMessage message in the Messages column.This will add the
PreTranslateMessage to your app.Press edit button and add the green code below:
BOOL YourDlg::PreTranslateMessage(MSG* pMsg)
{
if (accelTable) {
if (::TranslateAccelerator(m_hWnd, accelTable, pMsg)) {
return(TRUE);
}
}
return CDialog::PreTranslateMessage(pMsg);
}

Ok,rebuilt your project,and run.
It works for me~

A Figure that I should keep in my mind

When we use SVPWM method,the figure in the left are frequently used.The green isosceles triangle is the comprehension model,but the blue orthogonal triangle is the implementation model.Because it is much easier to generate the blue triangle wave than the green one.
SciTE is the most powerful and lightweight editor I have never seen in linux before.By default,it does not support Chinese input and display,so we need to do some configuration work.
$sudo scite
This will start scite at root privilege,because we need write privilege.
Click Option menu,choose Open User Options File,add codes below to the file:
# 支持utf-8中文
code.page=65001
LC_CTYPE=zh_CN.UTF-8
output.code.page=65001

now,try typing some Chinese words,it works!

PS:I use SciTE as my C/C++ editor,of course I need the function of autocompletion,this is easy to configure,just uncomment the line:
autocompleteword.automatic=1
The only bug I had found is the Stop Executing function does not work for me.I had to turn off SciTE every time.

A nice site

meebo.com is a website for instant messaging from absolutely anywhere. Whether you’re at home, on campus, at work, or traveling foreign lands, hop over to meebo.com on any computer to access all of your buddies (on AIM, Yahoo!, MSN, Google Talk, ICQ and Jabber) and chat with them, no downloads or installs required, for free!


A nice site ,which is worthy being added to my favorite!

Google's China Problem (and China's Google Problem)

By Clive Thompson

For many young people in China, Kai-Fu Lee is a celebrity. Not quite on the level of a movie star like Edison Chen or the singers in the boy band F4, but for a 44-year-old computer scientist who invariably appears in a somber dark suit, he can really draw a crowd. When Lee, the new head of operations for Google in China, gave a lecture at one Chinese university about how young Chinese should compete with the rest of the world, scalpers sold tickets for $60 apiece. At another, an audience of 8,000 showed up; students sprawled out on the ground, fixed on every word.


Kai-Fu Lee, head of operations for Google in China.

It is not hard to see why Lee has become a cult figure for China's high-tech youth. He grew up in Taiwan, went to Columbia and Carnegie-Mellon and is fluent in both English and Mandarin. Before joining Google last year, he worked for Apple in California and then for Microsoft in China; he set up Microsoft Research Asia, the company's research-and-development lab in Beijing. In person, Lee exudes the cheery optimism of a life coach; last year, he published "Be Your Personal Best," a fast-selling self-help book that urged Chinese students to adopt the risk-taking spirit of American capitalism. When he started the Microsoft lab seven years ago, he hired dozens of China's top graduates; he will now be doing the same thing for Google. "The students of China are remarkable," he told me when I met him in Beijing in February. "There is a huge desire to learn."

Lee can sound almost evangelical when he talks about the liberating power of technology. The Internet, he says, will level the playing field for China's enormous rural underclass; once the country's small villages are connected, he says, students thousands of miles from Shanghai or Beijing will be able to access online course materials from M.I.T. or Harvard and fully educate themselves. Lee has been with Google since only last summer, but he wears the company's earnest, utopian ethos on his sleeve: when he was hired away from Microsoft, he published a gushingly emotional open letter on his personal Web site, praising Google's mission to bring information to the masses. He concluded with an exuberant equation that translates as "youth + freedom + equality + bottom-up innovation + user focus + don't be evil = The Miracle of Google."

When I visited with Lee, that miracle was being conducted out of a collection of bland offices in downtown Beijing that looked as if they had been hastily rented and occupied. The small rooms were full of eager young Chinese men in hip sweatshirts clustered around enormous flat-panel monitors, debugging code for new Google projects. "The ideals that we uphold here are really just so important and noble," Lee told me. "How to build stuff that users like, and figure out how to make money later. And 'Don't Do Evil' " — he was referring to Google's bold motto, "Don't Be Evil" — "all of those things. I think I've always been an idealist in my heart."

Yet Google's conduct in China has in recent months seemed considerably less than idealistic. In January, a few months after Lee opened the Beijing office, the company announced it would be introducing a new version of its search engine for the Chinese market. To obey China's censorship laws, Google's representatives explained, the company had agreed to purge its search results of any Web sites disapproved of by the Chinese government, including Web sites promoting Falun Gong, a government-banned spiritual movement; sites promoting free speech in China; or any mention of the 1989 Tiananmen Square massacre. If you search for "Tibet" or "Falun Gong" most anywhere in the world on google.com, you'll find thousands of blog entries, news items and chat rooms on Chinese repression. Do the same search inside China on google.cn, and most, if not all, of these links will be gone. Google will have erased them completely.

Google's decision did not go over well in the United States. In February, company executives were called into Congressional hearings and compared to Nazi collaborators. The company's stock fell, and protesters waved placards outside the company's headquarters in Mountain View, Calif. Google wasn't the only American high-tech company to run aground in China in recent months, nor was it the worst offender. But Google's executives were supposed to be cut from a different cloth. When the company went public two years ago, its telegenic young founders, Sergey Brin and Larry Page, wrote in the company's official filing for the Securities and Exchange Commission that Google is "a company that is trustworthy and interested in the public good." How could Google square that with making nice with a repressive Chinese regime and the Communist Party behind it?

It was difficult for me to know exactly how Lee felt about the company's arrangement with China's authoritarian leadership. As a condition of our meeting, Google had demanded that I not raise the issue of government relations; only the executives in Google's California head office were allowed to discuss those matters. But as Lee and I talked about how the Internet was transforming China, he offered one opinion that seemed telling: the Chinese students he meets and employs, Lee said, do not hunger for democracy. "People are actually quite free to talk about the subject," he added, meaning democracy and human rights in China. "I don't think they care that much. I think people would say: 'Hey, U.S. democracy, that's a good form of government. Chinese government, good and stable, that's a good form of government. Whatever, as long as I get to go to my favorite Web site, see my friends, live happily.' " Certainly, he said, the idea of personal expression, of speaking out publicly, had become vastly more popular among young Chinese as the Internet had grown and as blogging and online chat had become widespread. "But I don't think of this as a political statement at all," Lee said. "I think it's more people finding that they can express themselves and be heard, and they love to keep doing that."

It sounded to me like company spin — a curiously deflated notion of free speech. But spend some time among China's nascent class of Internet users, as I have these past months, and you begin to hear such talk somewhat differently. Youth + freedom + equality + don't be evil is an equation with few constants and many possible solutions. What is freedom, just now, to the Chinese? Are there gradations of censorship, better and worse ways to limit information? In America, that seems like an intolerable question — the end of the conversation. But in China, as Google has discovered, it is just the beginning.

Cultural Differences
Google was not, in fact, a pioneer in China. Yahoo was the first major American Internet company to enter the market, introducing a Chinese-language version of its site and opening up an office in Beijing in 1999. Yahoo executives quickly learned how difficult China was to penetrate — and how baffling the country's cultural barriers can be for Americans. Chinese businesspeople, for example, rarely rely on e-mail, because they find the idea of leaving messages to be socially awkward. They prefer live exchanges, which means they gravitate to mobile phones and short text messages instead. (They avoid voicemail for the same reason; during the weeks I traveled in China, whenever I called a Chinese executive whose phone was turned off, I would get a recording saying that the person was simply "unavailable," and the phone would not accept messages.) The most popular feature of the Internet for Chinese users — much more so than in the United States — is the online discussion board, where long, rollicking arguments and flame wars spill on for thousands of comments. Baidu, a Chinese search engine that was introduced in 2001 as an early competitor to Yahoo, capitalized on the national fervor for chat and invented a tool that allows people to create instant discussion groups based on popular search queries. When users now search on baidu.com for the name of the Chinese N.B.A. star Yao Ming, for example, they are shown not only links to news reports on his games; they are also able to join a chat room with thousands of others and argue about him. Baidu's chat rooms receive as many as five million posts a day.

As Yahoo found, these cultural nuances made the sites run by American companies feel simply foreign to Chinese users — and drove them instead to local portals designed by Chinese entrepreneurs. These sites, including Sina.com and Sohu.com, had less useful search engines, but they were full of links to chat rooms and government-approved Chinese-language news sites. Nationalist feelings might have played a role, too, in the success Chinese-run sites enjoyed at Yahoo's expense. "There's now a very strong sense of pride in supporting the local guy," I was told by Andrew Lih, a Chinese-American professor of media studies at the University of Hong Kong.

Yahoo also was slow to tap into another powerful force in Chinese life: rampant piracy. In most parts of the West, after the Napster wars, movie and music piracy is increasingly understood as an illicit activity; it thrives, certainly, but there is now a stigma against taking too much intellectual content without paying for it. (Hence the success of iTunes.) In China, downloading illegal copies of music, movies and software is as normal and accepted as checking the weather online. Baidu's executives discovered early on that many young users were using the Internet to hunt for pirated MP3's, so the company developed an easy-to-use interface specifically for this purpose. When I sat in an Internet cafe in Beijing one afternoon, a teenager with mutton-chop sideburns a few chairs over from me sipped a Coke and watched a samurai movie he'd downloaded free, while his friends used Baidu to find and pull down pirated tracks from the 50 Cent album "Get Rich or Die Tryin'." Almost one-fifth of Baidu's traffic comes from searching for unlicensed MP3's that would be illegal in the United States. Robin Li, Baidu's 37-year-old founder and C.E.O., is unrepentant. "Right now I think that the record companies may not be happy about the service we are offering," he told me recently, "but I think digital music as a trend is unstoppable."

At first, Google took a different approach to the Chinese market than Yahoo did. In early 2000, Google's engineers quietly set about creating a version of their search engine that could understand character-based Asian languages like Chinese, Japanese and Korean. By the end of the year, they had put up a clunky but serviceable Chinese-language version of Google's home page. If you were in China and surfed over to google.com in 2001, Google's servers would automatically detect that you were inside the country and send you to the Chinese-language search interface, much in the same way google.com serves up a French-language interface to users in France.

While Baidu appealed to young MP3 hunters, Google became popular with a different set: white-collar urban professionals in the major Chinese cities, aspirational types who follow Western styles and sprinkle English words into conversation, a class that prides itself on being cosmopolitan rather than nationalistic. By pulling in that audience, Google by the end of 2002 achieved a level of success that had eluded Yahoo: it amassed an estimated 25 percent of all search traffic in China — and it did so working entirely from California, far outside the Chinese government's sphere of influence.

The Great Firewall
Then on Sept. 3, 2002, Google vanished. Chinese workers arrived at their desks to find that Google's site was down, with just an error page in its place. The Chinese government had begun blocking it. China has two main methods for censoring the Web. For companies inside its borders, the government uses a broad array of penalties and threats to keep content clean. For Web sites that originate anywhere else in the world, the government has another impressively effective mechanism of control: what techies call the Great Firewall of China.

When you use the Internet, it often feels placeless and virtual, but it's not. It runs on real wires that cut through real geographical boundaries. There are three main fiber-optic pipelines in China, giant underground cables that provide Internet access for the public and connect China to the rest of the Internet outside its borders. The Chinese government requires the private-sector companies that run these fiber-optic networks to specially configure "router" switches at the edge of the network, where signals cross into foreign countries. These routers — some of which are made by Cisco Systems, an American firm — serve as China's new censors.

If you log onto a computer in downtown Beijing and try to access a Web site hosted on a server in Chicago, your Internet browser sends out a request for that specific Web page. The request travels over one of the Chinese pipelines until it hits the routers at the border, where it is then examined. If the request is for a site that is on the government's blacklist — and there are lots of them — it won't get through. If the site isn't blocked wholesale, the routers then examine the words in the requested page's Internet address for blacklisted terms. If the address contains a word like "falun" or even a coded term like "198964" (which Chinese dissidents use to signify June 4, 1989, the date of the Tiananmen Square massacre), the router will block the signal. Back in the Internet cafe, your browser will display an error message. The filters can be surprisingly sophisticated, allowing certain pages from a site to slip through while blocking others. While I sat at one Internet cafe in Beijing, the government's filters allowed me to surf the entertainment and sports pages of the BBC but not its news section.

Google posed a unique problem for the censors: Because the company had no office at the time inside the country, the Chinese government had no legal authority over it — no ability to demand that Google voluntarily withhold its search results from Chinese users. And the firewall only half-worked in Google's case: it could block sites that Google pointed to, but in some cases it would let slip through a list of search results that included banned sites. So if you were in Shanghai and you searched for "human rights in China" on google.com, you would get a list of search results that included Human Rights in China (hrichina.org), a New York-based organization whose Web site is banned by the Chinese government. But if you tried to follow the link to hrichina.org, you would get nothing but an error message; the firewall would block the page. You could see that the banned sites existed, in other words, but you couldn't reach them. Government officials didn't like this situation — Chinese citizens were receiving constant reminders that their leaders felt threatened by certain subjects — but Google was popular enough that they were reluctant to block it entirely.

In 2002, though, something changed, and the Chinese government decided to shut down all access to Google. Why? Theories abound. Sergey Brin, the co-founder of Google, whose responsibilities include government relations, told me that he suspects the block might have been at the instigation of a competitor — one of its Chinese rivals. Brin is too diplomatic to accuse anyone by name, but various American Internet executives told me they believe that Baidu has at times benefited from covert government intervention. A young Chinese-American entrepreneur in Beijing told me that she had heard that the instigator of the Google blockade was Baidu, which in 2002 had less than 3 percent of the search market compared with Google's 24 percent. "Basically, some Baidu people sat down and did hundreds of searches for banned materials on Google," she said. (Like many Internet businesspeople I spoke with in China, she asked to remain anonymous, fearing retribution from the authorities.) "Then they took all the results, printed them up and went to the government and said, 'Look at all this bad stuff you can find on Google!' That's why the government took Google offline." Baidu strongly denies the charge, and when I spoke to Guo Liang, a professor at the Chinese Academy of Social Sciences in Beijing, he dismissed the idea and argued that Baidu is simply a stronger competitor than Google, with a better grasp of Chinese desires. Still, many Beijing high-tech insiders told me that it is common for domestic Internet firms to complain to the government about the illicit content of competitors, in the hope that their rivals will suffer the consequences. In China, the censorship regime is not only a political tool; it is also a competitive one — a cudgel that private firms use to beat one another with.

Self-Discipline Awards
When I visited a dingy Internet cafe one November evening in Beijing, its 120 or so cubicles were crammed with teenagers. (Because computers and home Internet connections are so expensive, many of China's mostly young Internet users go online in these cafes, which charge mere pennies per hour and provide fast broadband — and cold soft drinks.) Everyone in the cafe looked to be settled in for a long evening of lightweight entertainment: young girls in pink and yellow Hello Kitty sweaters juggled multiple chat sessions, while upstairs a gang of young Chinese soldiers in olive-drab coats laughed as they crossed swords in the medieval fantasy game World of Warcraft. On one wall, next to a faded kung-fu movie poster, was a yellow sign that said, in Chinese characters, "Do not go to pornographic or illegal Web sites." The warning seemed almost beside the point; nobody here looked even remotely likely to be hunting for banned Tiananmen Square retrospectives. I asked the cafe manager, a man with huge aviator glasses and graying hair, how often his clients try to view illegal content. Not often, he said with a chuckle, and when they do, it's usually pornography. He said he figured it was the government's job to keep banned materials inaccessible. "If it's not supposed to be seen," he said, "it's not supposed to be seen."

One mistake Westerners frequently make about China is to assume that the government is furtive about its censorship. On the contrary, the party is quite matter of fact about it — proud, even. One American businessman who would speak only anonymously told me the story of attending an award ceremony last year held by the Internet Society of China for Internet firms, including the major Internet service providers. "I'm sitting there in the audience for this thing," he recounted, "and they say, 'And now it's time to award our annual Self-Discipline Awards!' And they gave 10 companies an award. They gave them a plaque. They shook hands. The minister was there; he took his picture with each guy. It was basically like Excellence in Self-Censorship — and everybody in the audience is, like, clapping." Internet censorship in China, this businessman explained, is presented as a benevolent police function. In January, the Shenzhen Public Security Bureau created two cuddly little anime-style cartoon "Internet Police" mascots named "Jingjing" and "Chacha"; each cybercop has a blog and a chat window where Chinese citizens can talk to them. As a Shenzhen official candidly told The Beijing Youth Daily, "The main function of Jingjing and Chacha is to intimidate." The article went on to explain that the characters are there "to publicly remind all Netizens to be conscious of safe and healthy use of the Internet, self-regulate their online behavior and maintain harmonious Internet order together."

Intimidation and "self-regulation" are, in fact, critical to how the party communicates its censorship rules to private-sector Internet companies. To be permitted to offer Internet services, a private company must sign a license agreeing not to circulate content on certain subjects, including material that "damages the honor or interests of the state" or "disturbs the public order or destroys public stability" or even "infringes upon national customs and habits." One prohibition specifically targets "evil cults or superstition," a clear reference to Falun Gong. But the language is, for the most part, intentionally vague. It leaves wide discretion for any minor official in China's dozens of regulatory agencies to demand that something he finds offensive be taken offline.

Government officials from the State Council Information Office convene weekly meetings with executives from the largest Internet service companies — particularly major portals that run news stories and host blogs and discussion boards — to discuss what new topics are likely to emerge that week that the party would prefer be censored. "It's known informally as the 'wind-blowing meeting' — in other words, which way is the wind blowing," the American businessman told me. The government officials provide warnings for the days ahead, he explained. "They say: 'There's this party conference going on this week. There are some foreign dignitaries here on this trip.' "

American Internet firms typically arrive in China expecting the government to hand them an official blacklist of sites and words they must censor. They quickly discover that no master list exists. Instead, the government simply insists the firms interpret the vague regulations themselves. The companies must do a sort of political mind reading and intuit in advance what the government won't like. Last year, a list circulated online purporting to be a blacklist of words the government gives to Chinese blogging firms, including "democracy" and "human rights." In reality, the list had been cobbled together by a young executive at a Chinese blog company. Every time he received a request to take down a posting, he noted which phrase the government had objected to, and after a while he developed his own list simply to help his company avoid future hassles.

The penalty for noncompliance with censorship regulations can be serious. An American public-relations consultant who recently worked for a major domestic Chinese portal recalled an afternoon when Chinese police officers burst into the company's offices, dragged the C.E.O. into a conference room and berated him for failing to block illicit content. "He was pale with fear afterward," she said. "You have to understand, these people are terrified, just terrified. They're seriously worried about slipping up and going to jail. They think about it every day they go into the office."

As a result, Internet executives in China most likely censor far more material than they need to. The Chinese system relies on a classic psychological truth: self-censorship is always far more comprehensive than formal censorship. By having each private company assume responsibility for its corner of the Internet, the government effectively outsources the otherwise unmanageable task of monitoring the billions of e-mail messages, news stories and chat postings that circulate every day in China. The government's preferred method seems to be to leave the companies guessing, then to call up occasionally with angry demands that a Web page be taken down in 24 hours. "It's the panopticon," says James Mulvenon, a China specialist who is the head of a Washington policy group called the Center for Intelligence Research and Analysis. "There's a randomness to their enforcement, and that creates a sense that they're looking at everything."

The government's filtering, while comprehensive, is not total. One day a banned site might temporarily be visible, if the routers are overloaded — or if the government suddenly decides to tolerate it. The next day the site might disappear again. Generally, everyday Internet users react with caution. They rarely push the government's limits. There are lines that cannot be crossed, and without actually talking about it much, everyone who lives and breathes Chinese culture understands more or less where those lines are. This is precisely what makes the environment so bewildering to American Internet companies. What's allowed? What's not allowed?

In contrast to the confusion most Americans experience, Chinese businessmen would often just laugh when I asked whether the government's censorship regime was hard to navigate. "I'll tell you this, it's not more hard than dealing with Sarbanes and Oxley," said Xin Ye, a founding executive of Sohu.com, one of China's biggest Yahoo-like portals. (He was referring to the American law that requires publicly held companies to report in depth on their finances.) Another evening I had drinks in a Shanghai jazz bar with Charles Chao, the president of Sina, the country's biggest news site. When I asked him how often he needs to remove postings from the discussion boards on Sina.com, he said, "It's not often." I asked if that meant once a week, once a month or less often; he demurred. "I don't think I can talk about it," he said. Yet he seemed less annoyed than amused by my line of questioning. "I don't want to call it censorship," he said. "It's like in every country: they have a bias. There are taboos you can't talk about in the U.S., and everyone knows it."

Jack Ma put it more bluntly: "We don't want to annoy the government." Ma is the hyperkinetic C.E.O. of Alibaba, a Chinese e-commerce firm. I met him in November in the lobby of the China World Hotel in Beijing, just after Ma's company had closed one of the biggest deals in Chinese Internet history. Yahoo, whose share of the Chinese search-engine market had fallen (according to one academic survey) to just 2.3 percent, had paid $1 billion to buy 40 percent of Alibaba and had given Ma complete control over all of Yahoo's services in China, hoping he could do a better job with it. From his seat on a plush sofa, Ma explained Alibaba's position on online speech. "Anything that is illegal in China — it's not going to be on our search engine. Something that is really no good, like Falun Gong?" He shook his head in disgust. "No! We are a business! Shareholders want to make money. Shareholders want us to make the customer happy. Meanwhile, we do not have any responsibilities saying we should do this or that political thing. Forget about it!"

A Bit of a Revolution

Last fall, at a Starbucks in Beijing, I met with China's most famous political blogger. Zhao Jing, a dapper, handsome 31-year-old in a gray sweater, seemed positively exuberant as he explained how radically China had changed since the Web arrived in the late 1990's. Before, he said, the party controlled every single piece of media, but then Chinese began logging onto discussion boards and setting up blogs, and it was as if a bell jar had lifted. Even if you were still too cautious to talk about politics, the mere idea that you could publicly state your opinion about anything — the weather, the local sports scene — felt like a bit of a revolution.

Zhao (who now works in the Beijing bureau of The New York Times) pushed the limits further than most. After college, he took a job as a hotel receptionist in a small city. He figured that if he was lucky, he might one day own his own business. When he went online in 1998, though, he realized that what he really wanted to do was to speak out on political questions. He began writing essays and posting them on discussion boards. Soon after he started his online writing, a newspaper editor offered him a job as a reporter.

"This is what the Internet does," Zhao said, flashing a smile. "One week after I went on the Internet, I had a reputation all over the province. I never thought I could be a writer. But I realized the problem wasn't me — it was my small town." Zhao lost his reporting job in March 2003 after his paper published an essay by a retired official advocating political reform; the government retaliated by shutting the paper down. Still eager to write, in December 2004 Zhao started his blog, hosted on a blogging service with servers in the U.K. His witty pro-free-speech essays, written under the name Michael Anti, were soon drawing thousands of readers a day. Last August, the government used the Great Firewall to block his site so that no one in China could read it; defiant, he switched over to Microsoft's blogging tool, called MSN Spaces. The government was almost certainly still monitoring his work, but remarkably, he continued writing. Zhao knew he was safe, he told me, because he knew where to draw the line.

"If you talk every day online and criticize the government, they don't care," he said. "Because it's just talk. But if you organize — even if it's just three or four people — that's what they crack down on. It's not speech; it's organizing. People say I'm brave, but I'm not." The Internet brought Zhao a certain amount of political influence, yet he seemed less excited about the way his blog might transform the government and more excited about the way it had transformed his sense of himself. Several young Chinese told me the same thing. If the Internet is bringing a revolution to China, it is experienced mostly as one of self-actualization: empowerment in a thousand tiny, everyday ways.

One afternoon I visited with Jiang Jingyi, a 29-year-old Chinese woman who makes her living selling clothes on eBay. When she opened the door to her apartment in a trendy area of Shanghai, I felt as if I'd accidentally stumbled into a chic SoHo boutique. Three long racks full of puffy winter jackets and sweaters dominated the center of the living room, and neat rows of designer running shoes and boots ringed the walls. As she served me tea in a bedroom with four computers stacked on a desk, Jiang told me, through an interpreter, that she used to work as a full-time graphic designer. But she was a shopaholic, she said, and one day decided to take some of the cheap clothes she'd found at a local factory and put them up for auction online. They sold quickly, and she made a 30 percent profit. Over the next three months, she sold more and more clothes, until one one day she realized that her eBay profits were outstripping her weekly paycheck. She quit her job and began auctioning full time, and now her monthly sales are in excess of 100,000 yuan, or about $12,000.

"My parents can't understand it," she said with a giggle, as she clicked at the computer to show me one of her latest auctions, a winter jacket selling for 300 yuan. (Her description of the jacket translated as "Very trendy! You will look cool!") At the moment, Jiang sells mostly to Chinese in other major cities, since China's rudimentary banking system and the lack of a reliable credit-card network mean there is no easy way to receive payments from outside the country. But when Paypal — eBay's online payment system — finally links the global market with the Chinese market, she says she will become a small international business, marketing cut-rate clothes directly to hipsters in London or Los Angeles.

Compromises and Disclaimers
Google never did figure out exactly why it was knocked offline in 2002 by the Chinese government. The blocking ended abruptly after two weeks, as mysteriously as it had begun. But even after being unblocked, Google still had troubles. The Great Firewall tends to slow down all traffic coming into the country from the world outside. About 15 percent of the time, Google was simply unavailable in China because of data jams. The firewall also began punishing curious minds: whenever someone inside China searched for a banned term, the firewall would often retaliate by sending back a command that tricked the user's computer into believing Google itself had gone dead. For several minutes, the user would be unable to load Google's search page — a digital slap on the wrist, as it were. For Google, these delays and shutdowns were a real problem, because search engines like to boast about delivering results in milliseconds. Baidu, Google's chief Chinese-language rival, had no such problem, because its servers were located on Chinese soil and thus inside the Great Firewall. Worse, Chinese universities had virtually no access to foreign Web sites, which meant that impressionable college students — in other countries, Google's most ardent fans — were flocking instead to Baidu.

Brin and other Google executives realized that the firewall allowed them only two choices, neither of which they relished. If Google remained aloof and continued to run its Chinese site from foreign soil, it would face slowdowns from the firewall and the threat of more arbitrary blockades — and eventually, the loss of market share to Baidu and other Chinese search engines. If it opened up a Chinese office and moved its servers onto Chinese territory, it would no longer have to fight to get past the firewall, and its service would speed up. But then Google would be subject to China's self-censorship laws.

What eventually drove Google into China was a carrot and a stick. Baidu was the stick: by 2005, it had thoroughly whomped its competition, amassing nearly half of the Chinese search market, while Google's market share remained stuck at 27 percent. The carrot was Google's halcyon concept of itself, the belief that merely by improving access to information in an authoritarian country, it would be doing good. Certainly, the company's officials figured, it could do better than the local Chinese firms, which acquiesce to the censorship regime with a shrug. Sure, Google would have to censor the most politically sensitive Web sites — religious groups, democracy groups, memorials of the Tiananmen Square massacre — along with pornography. But that was only a tiny percentage of what Chinese users search for on Google. Google could still improve Chinese citizens' ability to learn about AIDS, environmental problems, avian flu, world markets. Revenue, Brin told me, wasn't a big part of the equation. He said he thought it would be years before Google would make much if any profit in China. In fact, he argued, going into China "wasn't as much a business decision as a decision about getting people information. And we decided in the end that we should make this compromise."

He and his executives began discussing exactly which compromises they could tolerate. They decided that — unlike Yahoo and Microsoft — they would not offer e-mail or blogging services inside China, since that could put them in a position of being forced to censor blog postings or hand over dissidents' personal information to the secret police. They also decided they would not take down the existing, unfiltered Chinese-language version of the google.com engine. In essence, they would offer two search engines in Chinese. Chinese surfers could still access the old google.com; it would produce uncensored search results, though controversial links would still lead to dead ends, and the site would be slowed down and occasionally blocked entirely by the firewall. The new option would be google.cn, where the results would be censored by Google — but would arrive quickly, reliably and unhindered by the firewall.

Brin and his team decided that if they were going to be forced to censor the results for a search for "Tiananmen Square," then they would put a disclaimer at the top of the search results on google.cn explaining that information had been removed in accordance with Chinese law. When Chinese users search for forbidden terms, Brin said, "they can notice what's missing, or at least notice the local control." It is precisely the solution you'd expect from a computer scientist: the absence of information is a type of information. (Google displays similar disclaimers in France and Germany, where they strip out links to pro-Nazi Web sites.)

Brin's team had one more challenge to confront: how to determine which sites to block? The Chinese government wouldn't give them a list. So Google's engineers hit on a high-tech solution. They set up a computer inside China and programmed it to try to access Web sites outside the country, one after another. If a site was blocked by the firewall, it meant the government regarded it as illicit — so it became part of Google's blacklist.

The Google executives signed their license to become a Chinese Internet service in December 2005. They never formally sat down with government officials and received permission to put the disclaimer on censored search results. They simply decided to do it — and waited to see how the government would react.

The China Storm
Google.cn formally opened on Jan. 27 this year, and human-rights activists immediately logged onto the new engine to see how it worked. The censorship was indeed comprehensive: the first page of results for "Falun Gong," they discovered, consisted solely of anti-Falun Gong sites. Google's image-searching engine — which hunts for pictures — produced equally skewed results. A query for "Tiananmen Square" omitted many iconic photos of the protest and the crackdown. Instead, it produced tourism pictures of the square lighted up at night and happy Chinese couples posing before it.

Google's timing could not have been worse. Google.cn was introduced into a political environment that was rapidly souring for American high-tech firms in China. Last September, Reporters Without Borders revealed that in 2004, Yahoo handed over an e-mail user's personal information to the Chinese government. The user, a business journalist named Shi Tao, had used his Chinese Yahoo account to leak details of a government document on press restrictions to a pro-democracy Web site run by Chinese exiles in New York. The government sentenced him to 10 years in prison. Then in December, Microsoft obeyed a government request to delete the writings of Zhao Jing — the free-speech blogger I'd met with in the fall. What was most remarkable about this was that Microsoft's blogging service has no servers located in China; the company effectively allowed China's censors to reach across the ocean and erase data stored on American territory.

Against this backdrop, the Google executives probably expected to appear comparatively responsible and ethical. But instead, as the China storm swirled around Silicon Valley in February, Google bore the brunt of it. At the Congressional hearings where the three companies testified — along with Cisco, makers of hardware used in the Great Firewall — legislators assailed all the firms, but ripped into Google with particular fire. They asked how a company with the slogan "Don't Be Evil" could conspire with China's censors. "That makes you a functionary of the Chinese government," said Jim Leach, an Iowa Republican. "So if this Congress wanted to learn how to censor, we'd go to you."

Zhao Jing's Rankings
In February, I met with Zhao Jing again, two months after his pro-democracy blog was erased by Microsoft. We ordered drinks at a faux-Irish pub in downtown Beijing. Zhao was still as energetic as ever, though he also seemed a bit rueful over his exuberant comments in our last conversation. "I'm more cynical now," he said. His blog had been killed because of a single post. In December, a Chinese newspaper editor was fired, and Zhao called for a boycott of the paper. That apparently crossed the line. It was more than just talk; Zhao had now called for a political action. The government contacted Microsoft to demand the blog be shuttered, and the company complied — earning it a chorus of outrage from free-speech advocates in the United States, who accused Microsoft of having acted without even receiving a formal legal request from the Chinese government.

Microsoft seemed chastened by the public uproar; at the Congressional hearings, the company's director of government relations expressed regret. To try to save face, Microsoft executives pointed out that they had saved a copy of the deleted blog postings and sent them to Zhao. What they did not mention, Zhao told me, is that they refused to e-mail Zhao the postings; they offered merely to burn them onto a CD and mail them to any address in the United States Zhao requested. Microsoft appeared to be so afraid of the Chinese government, Zhao noted with a bitter laugh, that the company would not even send the banned material into China by mail. (Microsoft declined to comment for this article.)

I expected Zhao to be much angrier with the American Internet companies than he was. He was surprisingly philosophical. He ranked the companies in order of ethics, ticking them off with his fingers. Google, he said, was at the top of the pile. It was genuinely improving the quality of Chinese information and trying to do its best within a bad system. Microsoft came next; Zhao was obviously unhappy with its decision, but he said that it had produced such an easy-to-use blogging tool that, on balance, Microsoft was helping Chinese people to speak publicly. Yahoo came last, and Zhao had nothing but venom for the company.

"Google has struck a compromise," he said, and compromises are sometimes necessary. Yahoo's behavior, he added, put it in a different category: "Yahoo is a sellout. Chinese people hate Yahoo." The difference, Zhao said, was that Yahoo had put individual dissidents in serious danger and done so apparently without thinking much about the human damage. (Yahoo did not respond to requests for comment.) Google, by contrast, had avoided introducing any service that could get someone jailed. It was censoring information, but Zhao considered that a sin of omission, rather than of commission.

The Distorted Universe
Zhao's moral calculus was striking, not least because it is so foreign to American ways of thinking. For most Americans, or certainly for most of those who think and write about China, there are no half-measures in democracy or free speech. A country either fully embraces these principles, or it disappears down the slippery slope of totalitarianism. But China's bloggers and Internet users have already lived at the bottom of the slippery slope. From their perspective, the Internet — as filtered as it is — has already changed Chinese society profoundly. For the younger generation, especially, it has turned public speech into a daily act. This, ultimately, is the perspective that Google has adopted, too. And it raises an interesting question: Can an imperfect Internet help change a society for the better?

One Internet executive I spoke to summed up the conundrum of China's Internet as the "distorted universe" problem. What happens to people's worldviews when they do a Google search for Falun Gong and almost exclusively find sites opposed to it, as would happen today on google.cn? Perhaps they would trust Google's authority and assume there is nothing to be found. This is the fear of Christopher Smith, the Republican representative who convened the recent Congressional hearings. "When Google sends you to a Chinese propaganda source on a sensitive subject, it's got the imprimatur of Google," he told me recently. "And that influences the next generation — they think, Maybe we can live with this dictatorship. Without your Lech Walesas, you never get democracy." For Smith, Google's logic is the logic of appeasement. Like the companies that sought to "engage" with apartheid South Africa, Google's executives are too dedicated to profits ever to push for serious political change. (Earlier this month, Google's C.E.O., Eric Schmidt, visited Kai-Fu Lee in Beijing and told journalists that it would be "arrogant" of Google to try to change China's censorship laws.)

But perhaps the distorted universe is less of a problem in China, because — as many Chinese citizens told me — the Chinese people long ago learned to read past the distortions of Communist propaganda and media control. Guo Liang, the professor at the Chinese social sciences academy, told me about one revealing encounter. "These guys at Harvard did a study of the Chinese Internet," Guo said. "I talked to them and asked, 'What were your results?' They said, 'We think the Chinese government tries to control the Internet.' I just laughed. I said, 'We know that!' " Google's filtering of its results was not controversial for Guo because it was nothing new.

Andrew Lih, the Chinese-American professor at the University of Hong Kong, said that many in China take a long-term perspective. "Chinese people have a 5,000-year view of history," he said. "You ban a Web site, and they're like: 'Oh, give it time. It'll come back.' " Or consider the position of a group of Chinese Internet geeks trying to get access to Wikipedia, the massive free online encyclopedia where anyone can write an entry. Currently, all of wikipedia.com is blocked; the group is trying to convince Wikipedia's overseers to agree to the creation of a sanitized Chinese version with the potentially illegal entries removed. They argue that this would leave 99.9 percent of Wikipedia intact, and if that material were freely available in China, they say, it would be a great boon for China, particularly for underfinanced and isolated schools. (So far, Wikipedia has said it will not allow the creation of a censored version of the encyclopedia.)

Given how flexible computer code is, there are plenty of ways to distort the universe — to make its omissions more or less visible. At one point while developing google.cn, Google considered blocking all sites that refer to controversial topics. A search for Falun Gong in China would produce no sites in favor of it, but no sites opposing it either. What sort of effect would that have had? Remember too that when Google introduced its censored google.cn engine, it also left its original google.com Chinese-language engine online. Which means that any Chinese citizen can sit in a Net cafe, plug "Tiananmen Square" into each version of the search engine and then compare the different results — a trick that makes the blacklist somewhat visible. Critics have suggested that Google should go even further and actually publish its blacklist online in the United States, making its act of censorship entirely transparent.

The Super Girl Theory
When I spoke to Kai-Fu Lee in Google's Beijing offices, there were moments that to me felt jarring. One minute he sounded like a freedom-loving Googler, arguing that the Internet inherently empowers its users. But the next minute he sounded more like Jack Ma of Alibaba — insisting that the Chinese have no interest in rocking the boat. It is a circular logic I encountered again and again while talking to China's Internet executives: we don't feel bad about filtering political results because our users aren't looking for that stuff anyway.

They may be right about their users' behavior. But you could just as easily argue that their users are incurious because they're cowed. Who would openly search for illegal content in a public Internet cafe — or even at home, since the government requires that every person with personal Internet access register his name and phone number with the government for tracking purposes? It is also possible that the government's crackdown on the Internet could become more intense if the country's huge population of poor farmers begins agitating online. The government is reasonably tolerant of well-educated professionals online. But the farmers, upset about corrupt local officials, are serious activists, and they pose a real threat to Beijing; they staged 70,000 demonstrations in 2004, many of which the government violently suppressed.

In the eyes of critics, Google is lying to itself about the desires of Chinese Internet users and collaborating with the Communist Party merely to secure a profitable market. To take Lee at his word is to take a leap of faith: that the Internet, simply through its own inherent properties, will slowly chip away at the government's ability to control speech, seeding a cultural change that strongly favors democracy. In this view, there will be no "great man" revolution in China, no Lech Walesa rallying his oppressed countrymen. Instead, the freedom fighters will be a half-billion mostly apolitical young Chinese, blogging and chatting about their dates, their favorite bands, video games — an entire generation that is growing up with public speech as a regular habit.

At one point in our conversation, Lee talked about the "Super Girl" competition televised in China last year, the country's analogue to "American Idol." Much like the American version of the show, it featured young women belting out covers of mainstream Western pop songs amid a blizzard of corporate branding. (The full title of the show was "Mongolian Cow Sour Yogurt Super Girl Contest," in honor of its sponsor.) In each round, viewers could vote for their favorite competitor via text message from their mobile phones. As the season ran its course, it began to resemble a presidential election campaign, with delirious fans setting up Web sites urging voters to pick their favorite singer. In the final episode, eight million young Chinese used their mobile phones to vote; the winner was Li Yuchun, a 21-year-old who dressed like a schoolgirl and sang "Zombie," by the Irish band the Cranberries.

"If you think about a practice for democracy, this is it," Lee said. "People voted for Super Girls. They loved it — they went out and campaigned." It may not be a revolution, in other words, but it might be a start.

How to use mail command in Linux

In my Unbuntu server,I need to install mailx first:
$sudo apt-get install mailx
Usage:
for example:$mail hongjunxATgmail.com<~/mymail
Okay,glut is not necessary in OpenGL programing,but it makes our job easier.I choose Deb-C++ as my development tool,so this post shows how to install glut package to Dev-C++ compiler.The core components of Dev-C++ are GNU-gcc and GNU-g++ complier,famous compilers and almost the only C/C++ compilers in *nix platform.I strongly recommend you try to use Dev-C++,it is good and easy to use as I think,and good support to C++ strandard.(I had encountered the getline function and local variabl scope problems in my VC++6.0,so I turn my head to Dev-c++)
If you do not have a Dev-C++ installed in your PC,as I said before,why not install it,it is free and really good.Are you ready?
Here are 3 things that you need to do:
i Download and install Dev C++
ii Download glut (OpenGL)
iii Create a project to run a your first OpenGl program in Dev-C++

Step i
Dev C++ can be downloaded from here.

Step ii
To use Open GL install the correct version of glut DevPack go to http://www.nigels.com/glt/devpak.
Download glut.3.7.6+.DevPak to a local folder
In Dev C++ open the package manager:
Tools->Package Manager
Install the glut package:
Package->Install Package
Browse to the local location where the package was downloaded to follow the installation wizard
The glut package should now appear in the main pane
Exit package manager

Step iii
To compile, build and run using Dev C++: make a new project:
File->New->Project...
Select Empty Project type from the Basic tab window
Make sure C++ project is selected
Create the new project in the folder with the source file
Add the .cpp file to the project:
Project->add to project
select the .cpp file
Define the linker options:
Project->Project options
In the Parameters tab window add the following line in the Linker pane:
-lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32
click ok
Compile and run the project:
Execute->Compile & run

Mplayer error when open rmvb file

I got Mplayer worked on my Ubuntu ,but when I open an rmvb media file,it prompt an error message says:
ERROR: Could not open required DirectShow codec drvc.so
Here is a solution to this error:
$sudo apt-get install libstdc++5

My web robot

Try it...

Jun 1st Children's Day

Long time not coming here.Today is Children's Day,a new month started...

My paper nearly come out,its name is "Two-stage matrix converter drived indirect torque control of induction motor",hope it will be published and get me graduated successfully.

Actually,these days I am focusing on Ubuntu,which is a Linux distro based on Debian.Ubuntu is considered as the most potential Linux distro among all the famous Linux distros.Nearly half a year,a new version would be published.Now,the version is 7.04,with the name "Feisty fawn".I did get my system upgraded to Feisty fawn last Friday,but today,I did something really really silly:I changed the directory /usr and all its sub directory's mode to 777,then I can not use sudo.When I press ctr+alt+backspace to turn to terminal mode,I found I can not start x-window,system tips said "users do not have the authority to run x-server"."Oh,god",This is really bad news.I have no other idea but turn my head to online help.Under terminal,I had to enter IRC channel.When I described my problem said "What should I do?",a guy relied:"Reinstall",then followed with some ironic words:"What were you thinking about then?". "Oh,god!",I replied and quit as fast as I can,it is a shame,really.I can not forgive myself...Maybe you may wonder why I changed the /usr directory mode to 777,I would say,I was doing some copy and paste work under x-window,I thought if I changed all the directory mode to 777,I could do my all job just by click mouse,no need typing under x-terminal.After this fatal system failure,I know that Linux never forgive those silly people.Maybe you had heard of the famous "#rm /" story...

Oh,really forgotten,Our boss,Mrs Su lead us climbing Yuelu mountain this afternoon.It is a long time that we do not go out for fun together.Actually,I am nervous having meal with my boss every time.How should overcome this barrier of my life?

Sparse matrix converter simulation

I am focused on sparse matrix converter simulation these days.Because I want to combine it with Indirect torque control.One day for learning the modulation strategy,one day for creating matlab/simulink based simulation system,and one day for debugging.I use s-function to implement the modulation strategy.It is easy to use,but hard to debug.Because matlab m language is a "weak type language" as compared to c/c++.We do not need to define a variable before we can use it.This mechanism make coding more convenient but at the other side error-prone.So we must be more careful when coding.Actually,debug my code had wasted much of my time.The most stupid error I made is that I defined the zero space vector as v0=[000000],it should be defined as v0=[010101].It is hard to find this error,because the simulation result showed that the output phase to phase voltages seems right when the system is unloaded.But once system operated with three-phase balanced RL load,the phase to phase output voltage becomes awesome.In order to find out what causes the problem,I had to check my code line by line.And finally,it was proved that the zero vector which I had wrongly defined cause it.Now it works fine.Simulation graphs are listed below:
Vdc figure with no loadPhase-to-phase output voltage with no load

Input voltage-current waveform,the input current is amplified by a gain of 10.Output three-phase current waveform

Vdc waveform with RL loadOutput phase-phase voltage with RL load

Simulation parameters:
Three-phase balanced RL load:R=1ohm,L=5e-3H;
Simulation step time:1e-6s;
Modulation frequency:10kHz;
Reference space vector:Vs=200v,f=50Hz

Gold week is over

This gold week is totally a work week for me.And I do have done something meaningful.First is that I make up my mind to make my own E-dictionary.My MSN robot works fine with the dictionary I imported to the database weeks ago,but it can not display phonetic symbols.I did not add phonetic symbols to the words.In this spare gold week,I think I should make it perfect.So I decide to add phonetic symbols to the database.For nearly a whole day's work,I successfully created my E-dictionary database with phonetic symbols.Phonetic symbols are mostly encoded in UTF-8 and Unicode,but the fucking server database is encoded in GBK and gb2312.My dream was nearly come to true!Last thing I can do is that try to persuade the SP to change their database encoding...

This afternoon when I was still in my dorm,I got a phone call from my mother.I have not got my mom's call for a long time actually.As all calls she called me,this is no other call but full of family love and careness.From her words,I know that my elder sister had a operation recently.Something wrong with her breast.She did not told me about this when she called me last week.Oh, god bless this lady...

report over.

May 1st Gold week is coming...

Time waits nobody,tomorrow is May 1st international worker's day,which is a gold week in china.We got total a week's rest.Most of my friends left for tour,some went home,but for me,I felt so disappointed in this May 1st eve.About two weeks ago,I decide to using ADRC in my UPFC system,just hope this would get my paper come out.So the first step I tried to apply ADRC in 3-phase boost-type PWM rectifier.After spending a whole day to recover my ADRC knowledge,I did get the two PI current controller replaced by two one-order ADRC,it does work but not so nice.Today,I tried to replace the outer voltage loop with ADRC,but I find it's hard to get ESO model.From the voltage equation,it has a really bizarre form,which I had never notice before.Because if we using PI,the real first step is to get the non-linear equations set linearized.No other effective methods I know but to create the small signal model.If we get the approximated linearized model,we could write out the system transfer function,once this step is done,half design work finished.But for ADRC,should I still using the small signal model?I do not know.ADRC is nonlinear controller,most cases I saw before is to use ADRC to get the state-equation set controlled directly,no linearization process.My dilemma is:it is impossible to get outer voltage loop ESO equation unless get the equation linearized first.Why should I use ADRC if I get the equation linearized?Big joke...

I am not going to complain about this disappointing holiday,I am destined to have to work in this 7-day holiday.The most I should complain is that I wasted nearly a week to get involved writing the 863 application for our boss.I am really tired of these fucking things since last time that helping to make the PPT of National Defence Foundation Suggestion Application.

Boss got promoted

Our "boss",Mrs Su,was promoted to Ph.D supervisor days before.We can tell obvious happiness on her face these days.But we are suffering these days from making a ppt used for a military project application.

Last Friday,our boss called us together for a temporary meeting.She announced us the news that our suggestion notes had got the first-step acceptance by specialists of National Defence & Science Engineering commission.April 19(the day this post posted),there would be a debate conference held in Beijing to discuss the feasibility of our suggestions.If we made it,we would get sponsored by NDSEC with 3000,000 yuan used for research.Three million is a big number of course,but the situation is that this is different from project competition,we suggest those officers of NDSEC what should be done,if they accept our suggestion finally,we got the money to do the base research.It is more about theoretical research than engineering realization. Surely ,it greatly intrigues our "female boss" who prefers theoretical research than engineering ...

The task was that we need to search the web and find the relevant information,then made a beautiful PPT.Because we are lack of military program application experience,and we know less about military background,this made us don't know what to start.The purpose of this program is to equip our combat vehicles with Matrix Converter.Our aim is clear:show how poor performance and disadvantage of AC-DC-AC converter is and how perfect property and advantage by using Matrix Converter in Combat vehicles.Actually,from googling,we know all of the equipped land combat vehicles such as tanks and armored combat vehicles,even the most advanced M1A1 tank are using diesel engine to provide propulsion and automotive.Most research dedicating all electrical combat vehicle are focused on AC-DC-AC converter except American army research laboratory(ARL).ARL are trying to using Matrix Converter in tanks,and they had made a 150kw Matrix Converter prototype.

After got enough information we got,making PPT is a energy consuming work.My task is mainly on plot picture and PPT animation. Four days of hard working,we finally got a version our boss satisfied.And now,I guess our boss is in the debate process now.God bless her...

A Black Monday for Virginia Tech. students...

This morning,I arrived my lab early.When I signed in my QQ,actually I had not signed in for a long time,and not long before I got a pop-up news snippet said that "American campus shooting causing 33 dead".This news of course is a big bang!So I launched my Web-browser to check this news out as soon as I can.Not surprisingly, this news hits the headlines of news site I know such as sohu,sina and CNN.From news report in CNN,Gunman massacres 33 at two Virginia Tech sites,Some students jumped from windows to escape,some Other students locked themselves in teacher's office.It is the deadliest shooting rampage in U.S. history.

Simulation of PWM rectifier based on D-Q frame


Appendix:
Rs=0.5,Ls=1e-3H
C=1e-3F,Rload=50ohm
Vdc_ref=500V
Vdc:Kp=0.1,ki=1.5(Vdc control loop)
Id:kp=0.1,ki=0.3125(Id control loop)
Iq:kp=0.1,ki=0.3125(Iq control loop,Iq_ref=0 under unity power factor)

She got accepted by Renmin university of China

She got her final offer by Renmin university of China.I know this news from her MSN space.I am so happy for her hardness coming out a good result.

I knew this girl about an year ago.I met her on putclub,a English learning forum.At that time,I was tortured by my poor listening and oral English.I noticed her reply,and I checked her profile.She left her contacts,so I added her to my QQ buddy.We didn't talk too much because she did not often show on line.But one day,she left me a message to let me fix up her computer problems.And after this,we talked a little more and I added her to my MSN buddy list.I knew her more and more,she was born in the same year with me.She was a bank official.And she said she wanted to get postgraduate education.She had a boyfriend in her college life.And now,according to her words,she is dating with a British born Chinese guy.This really made me hurted when I hearted this news.All of her posts are full of happiness and love.Truly speaking,I envied that damned British guy so much then.Oh my god,was I starting to fall love with her?I did not know then.What kept in my mind clearly is that every time when I signed in MSN,I hoped she was online.And the weird thought was that I hoped her computer was down again.I remembered one Saturday night of last year,I wanted to give her a call,but I did not finally.I felt so good about her then.But I did not have enough courage yet.

From her MSN space,I know much about her life.A fashion-following girl and seems had many love stories.And some time when I said "Hello" to her on MSN,she made no reply.This kind of rudeness made me outrageous. In her mind,maybe I was just a anti-virus tool.As a whole,she is not my type .

I wasted so much time chatting with her,sending her SMS for encouraging her study.Sometimes when I look back the way I walked through,I may think how silly was I then. Forget about all of this,I do not want to say no more about her.Wish her a good journey to Renmin university.

A non-study Saturday

For me,it is a non-study Saturday today.Actually,I woke up early this morning,so head up to my laboratory just want to debug my MCU program.As I posted before,I had built up a soft MCU simulation environment based on Proteus and keil.And yesterday night I got a music-play program from Internet,but it did work on my platform.A whole night wasted for debugging without results contented me.So this morning I decided to make a more detailed check.Not long than an hour had I been my lab,my roommate Gao,who rushed into my lab and asked me out said a classmate's visit.I followed him,and was guessing who this guy might be.It is Tan,our college classmate,who is now a military officer working in Zhuzhou city.He did visit us often,last time's visit is about 20 days ago.This time ,according his words,he got a nearly a month's holiday.For Tan,there are six classmates still stay in csu for master of science degree including me.After half an hour's chitchatting,I suggested him visit our laboratory and surf web for consuming time,but he refused.He said it was OK for him to walk around in the campus and asked me back to my work.He would call me at the lunch time.So I was back to my position,resume debugging my program.Through a step run debug,I found that there is a array that can not be assigned.That was weird.Finally I got the answer that the array was defined in external data space,but the simulation model I built up in ISIS did not extend the accord external memory space.This of course would take no effect of assignment.After I redefined this data array to internal memory space,the program worked perfectly.It was so happy for me to listen the sound came out rightly from my headphone.And time was nearly ten to twelve then.I consumed my left time on chinadaily for waiting his call.It was a not long waiting.We got to a restaurant for a reunite lunch.Free lunch for me.^_^.After the meal,eight of us,including Yin,headed up to our dormitory.I washed my clothes when they were chatting.A whole afternoon's chatting.I am so sleepy now because of no noon-nap today.At this my posting time,it seems hard for me to concentrate on my work.

However,this is a precious chance to be together for us.Maybe it will not be so easy for us to get together when all of us get worked.Anyway,thanks his meal and thanks his visit.

Proteus works with keil successfully

I built up my proteus environment yesterday.Story began yesterday afternoon when I heard by accident that there is a software named Proteus that can simulate C51 MCU.I was so exitted then because I have no MCU development kit,it would be a good idea to work on this soft platform.I searched Google,Out of my surprise,it even can work in conjunction with keil environment!It means I can debug my C51 programs,for keil,proteus works like a real board.What's more,it also support ARM processor.Can not wait any longer,I downloaded a crack version of proteus6.9 SP4 and keil,after installation,I thought there would be no problems,but I was wrong.When I load a sampler c51 calculator project in ISIS professional,at the same time I use keil to debug the sampler source code written in C,it showed my a error message said "Error target dll cancelled..."again and again.No measures could I take but turn my head to Google.From a Chinese proteus forum,I need another crack file-a crack prospice.dll file.I got this file from this forum site and replaced the same file located in the proteus installation directory Bin folder,finally keil worked with proteus perfect.I can debug my code,I can start the system on proteus.Actually,things were not that easy to be done like a described above.I spend whole my night to search the web,download crack files.After several failures,I made it!When the two systems works,it was nearly half past 23,I was left alone in the big laboratory.I turned off my computer,cut off lab's main power supply,locked the door,and run toward my dormitory...

Post April fool's day

Today is a cloudy Sunday,also the April fool's day.I should leave something memorable here.But today is quite a normal day.Nothing interesting happened to me.No fool,no funny.I spend all my day in PLC laboratory.The damned hot weather is back to normal finally,it is windy outside all day.

Our mentor,Mrs Su was back from her business journey yesterday,but did not show up in our lab yet.Stress from publishing papers make me have to read papers day after day.Though I know the principle of PWM rectifier and get the right simulation results at the present,there waiting lots of difficulties for me.Next step I am going to focus on static var generator(SVG),which has the same topology with three-phase PWM rectifier but with different control aim.SVG mainly takes active and reactive power as control variables.

Damned campus network was down this afternoon.I can not post it immediately on blogspot.

This post should be posted yesterday but because of the bad network.I really hope blogspot has the function of changing post timestamp,like wordpress does.

Today,there is a real funny thing.I was the last but one that left our room this morning.When I got out,I even do not realize that I locked the door with my key.I think I was thinking something then,but I can not remember now.When I arrived my lab not for long,I received a SMS sent by my roommate Xialixun.It says "You locked the door when you left,I can not un-lock it from inside!".I was shocked then.I even do not remeber I did that.I am sure I did know that Xialixun was still on his bed,but why I locked the door?No more to say,I replied "Oh god,I will be back soon".So I left my lab and run toward my dorm.It is about 15 minutes' journey.When I got to my room,we both laughed loud.It is a post April fool's day maybe.

Why am I looked so stupid today?

Careless or ignorance?

About several days ago,I settle down the basic direct current control simulation problems of three-phase PWM rectifier.And these days, I am trying using SVM modulation method.But first,I am focused on triangle modulation method.This time,the current control loop is based on d-q rotating coordinates ,with the angular speed same as that of the sinusoidal voltage source .Because if we want the unity input power factor,we set Iq reference value to zero.And if we get Id well controlled,and we get output voltage well controlled.We call Id as the active current component and Iq the reactive current component.In other means, we control these two current components,we are actually get the active and reactive power controlled.Maybe,this way is commonly used in SVG and UPFC,which is my final target.

The three-phase rectifier control model under d-q reference frame is far simple and easy to understand.There exists three control loop.In order to control output voltage,we build a outer voltage loop.The inner current loop are Id/Iq control loop.Outputs of these two current loop are Dd and Dq,which are switch duty-circle under d-q reference frame .In order to control the conduction of the IGBTs,we need to inverse transform the duty-circle under d-q reference frame to abc coordinates.In steady state,the abc duty-circle changes sinusoidally.Be careful that if the sequential signal which we used as carrier, repeats from 0 to 1,then make sure the abc duty-circle waves are in this range.If not,just use a proper gain and do some shift to make this condition satisfied.

After building up the simulation model,problems follows.The big problem is that I can not get Iq controlled.I changed the PI parameters again and again,and I failed again and again.Out of patient,I turn my help to my roommate also teammate,sir Xialixun.He helped me checking if there exists any errors.Without detecting any problems,he is also confused,so he copied his simulation model to me to let get a detail comparison.After check and comparison ,I finally found the problem.It is the problem of the three-phase voltage sources.The three-balance voltage source I set the phase angles are 0 degree,-120 degree,120 degree,But his are 90 degree,-30 degree,210 degree.After about server minutes' thinking,I think the problem come from the coordinates.As plot showed left,the three-dimensional static abc coordinates represent the ABC phase's spacial position.Alpha-beta is two dimensional plane.But d-q is the rotating coordinate which here we assume at a speed same as voltage source.The abc-dq transformer I used in my model based on the initial angle starts from alpha axis.But actually when Va=Vm*sin(0),Vb=Vm*sin(-2*pi/3),Vc=Vm*sin(2*pi/3),the real start point is from beta axis!There exist 90 degree difference and no wonder Iq can not be controlled.I had to confess that this is not because of my careless,but my ignorance.I didn't think about this question before. After I fixing this problem,the model works.Although the control performance is not that good because of the controller parameters.Any way,I have made a little progress forward.Next step,I need to review my control theory textbook.I really need to occupy the skill of controller design method.
It has been getting hot these days.The cold winter has left us,and the warm spring really comes.Today's temperature is round 30 degrees.

I watched a new movie named Ghost rider yesterday night.Its chief actor is Nicolas Cage,who is the ghost rider of the death god in this movie.The protagonist,Johny(casted by Cage),was a acrobatic motor bike rider that succeeded from his father.But one day by accident,he finds his father got cancer.He did not know his father was sick before.He went to his working place and death god showed.Death god knows everything about Johny's situation,and promise to cure his father if he is willing to sign a contract,a contract makes man ghost rider and works for death god. Not out of viewer's surprise,Johny does sign it.The whole process like a dream when Johny wakes up and finds his father a healthy man.But unfortunately that day,death god let his father die of the show accident.Death god drives Johny from his friends,his lover,his family,hoping make Johny a cool-blood man. But because of Johny's strong spirit,he is not totally controlled by death god.He still keeps his girl in mind and loves her very much.Finally,because he becomes more and more famous,he met his old lover again,now who is a news reporter. The presence of his old lover ignites his fire of love,and he decides to amend the relationship between them.They do get together but fighting time-the most fantastic part of this movie-comes.Death god orders Johny to kill another evil people,who was expelled by angels from heaven.The story ends with Johny completing his mission,and enjoying love with his girl friend,but not willing to be back to a normal man because he wants to end the contract at him. Sincerely speaking ,I like Nicolas Cage some much,his fantastic performance attracted me deeply.The first time I know Nicolas is from Face off.I watched Some other movie like Lord of war,Firebird,National Treasure,Con Air,etc...All these movies made Nicolas Cage the best actor of the world.

Funny thing is that,I registered 6 new blogspot site,just don't hope these URLs registered by others.

Damned PWM rectifier

I have focused on the shit PWM rectifier for several days.And now,I got problems down.I simulated my three-phase pwm rectifier model which is based on my Power electronics technology textbook on the Matlab/simulink platform.The principle of this model is very simple.The control aims include outputting a constant DC voltage,and input current must be sinusoidal without phase shift with respect to the input voltage.So PWM rectifier, compared to conventional diode rectifier and phase-controlled recitifer,which is famous for owning unity power factor.It does not pollute the power-supply network.But things seems not that easy when I started to simulate this model on simulink.My matlab version is v2006,this version of matlab is a resource-consuming monster for my celeron(R)1.7Ghz,256M memory machine.It wasted lot of my time starting the software,waiting it free memory etc...What's more,the model I thought is simple enough,will not have any problem.But the simulation results disappointed me deeply.The output voltage can not be controlled.Voltage compensator saturated all the time.The most strange thing is,what I built is a three-phase boost rectifier,but the output voltage just only can be adjusted downward,not upward.It made man mad.Lasting for several gloomy days,I nearly gave it up.I tried to find my answers in those IEEE papers.But not out of my surprise,no one will post articles based on such a simple model using a most basic hysteresis modulation method.Nearly all of the paper have one or two creative point,such as from topology to algorithm.I have no idea then but to turn my help to fundamentals of power electronics ebook.This book the master piece of Colorado power electronics center,which most concerned DC/DC converter.This book is really good,but it does not related much to three phase system.

After last virus attack,I reinstalled my system,and of course,I had to reinstall my matlab.This time I did not install version2006 but version6.5,a lower version but a resource saver.This afternoon,I rebuilt the pwm rectifier in my matlab6.5,after debuged some algebra loop errors,I got my model worked.Out of my surprise,it works so great,and the simulation result is very right!It is hard for me to interpret why it works on Matlab6.5 but not on 2006.Here I got the simulation results screenshots:
Output DC voltageInput voltage/current
The simulation result above is based on the parameters listed below:
Three phase balanced AC voltage source peak amplitude:100V,frequency=50Hz
Input inductance:1e-3H.
Input impedance:1ohm.
Output filter capacitance:1e-3F.
Load resistance:100ohm.
Reference output voltage:400V.
PI controller of voltage loop:kp=0.01,ki=1,output ranges from-100 to 100.
Current hysteresis regulator band:0.01.
PS:The relay submodel should be concerned carefully. It should output zero when switch on and output one when switch off.