The House Foreign Affairs Committee finished work yesterday on a bill to ensure Taiwan's security as the United States prepares to formally recognize the People's Republic of China.

A final committee vote is expected today.

The key phrase is similar to language the Senate Foreign Relations Committee reported out last week. It says any armed attack would be a threat to the peace and stability of the western Pacific area and of grave concern to the United States. It also provides for defensive arms for Taiwan.

To that phrase the House commitee added that any economic boycott (Word Illegible) embargo to prevent Taiwan from engaging in trade with other nations would be a threat.

A State Department representative at the meeting said the administration could live with that language.

Stronger language saying an armed attack would be "of security interest" rather than of grave concern to the United States was rejected by the committee by a 16-to-9 vote.

Rep. Dan Quayle (R-Ind.), who offered the stronger language, said "grave concern" was "so ambiguous" it "doesn't do anything."

Douglas Bennett, head congressional liaison officer for the State Department, told the committee the stronger language was a "commitment to military action" and would wreck the delicate compromise between the Carter administration, which at first opposed any language ensuring Taiwan's security, and Congress.

The administration gave in on Taiwan security language after China's invasion of Vietnam increased pressure on Capitol Hill for such language.

The House Foreign Affairs Committee will meet today to formally report out the bill; 22 of the 34 members of the committee have endorsed it.

The bills, which set up nongovernmental relations between Taiwan and the United States to clear the way for official recognition of Peking, will come to the floor next week. The Senate will take up its version Monday with the House to follow later.

Both bills are expected to pass.

Rep. Edward Derwinski (R-Ill.), speaking for many conservatives yesterday, told State Department officials, "You're living in a fool's paradise. You think we've got new friends. You've just embraced a bunch of bums."

The exchange of ambassadors with the People's Republic of China will take place Thursday.

The Taiwan legislation replaces formal relations with Taiwan with an informal "nongovernmental" relationship, carried on through an institure that will have some diplomatic immunity and other powers without being a formal and official body. A mutual defense treaty between Taiwan and the United States will be abrogated by the end of the year.

A move by Quayle to upgrade the status of the institute to a liaison office was defeated 12 to 5. Rep. Jonathan Bingham (D-N.Y.) said the move would "wreck the deal" because Chinese Vice Premier Teng Hsiao-ping said when he was here he would "not accept that."

In one gesture of sympathy for Taiwan, the House committee voted to allow it to keep the chancery and Twin Oaks, which had served as an embassy.

Taiwan had transferred ownership of the Twin Oaks property to a group called the "Friends of Free China" as a means of keeping the property out of the hands of the Peking goverment.

The bill would ensure that Taiwan can keep its foreign exchange assets, bank deposits and other property. An earlier version of the bill had not included the Twin Oaks property because, as a State Department representative said, the department considers it a "symbol of government" and thought Peking was a "better claimant" for it. The State Department had wanted the U.S. courts to be able to decide who should own the property if a case was brought by the Peking government.

Derwinski, however, said it should not be "part of the loot" going to Peking, and the committee agreed Taiwan could keep the property by a 13-to-7 vote.