WASHINGTON — Treasury Secretary Janet L. Yellen on Thursday will call for a “constructive” and “healthy” economic relationship between the United States and China, one in which the two nations work together to confront challenges like climate change, according to excerpts from prepared remarks.

Ms. Yellen’s comments, which she will deliver at Johns Hopkins University’s School of Advanced International Studies, will strike a notably positive tone about the U.S.-China relationship following months of heightened tensions between the two nations, which have the world’s largest economies.

Ms. Yellen is expected to stress the importance of securing American national security interests, as well as of protecting human rights. She will also emphasize that targeted actions the United States has taken against China — like cutting it off from the world’s most advanced semiconductors — are aimed purely at protecting U.S. national security.

China has criticized U.S. restrictions on its technological development, saying that they are unlawful and a blatant effort to try and weaken the Chinese economy. Ms. Yellen will seek to allay those concerns.

“These national security actions are not designed for us to gain a competitive economic advantage, or stifle China’s economic and technological modernization,” Ms. Yellen is expected to say. “Even though these policies may have economic impacts, they are driven by straightforward national security considerations.”

She also will emphasize the strength of the American economy, noting that the economic output of the United States remains far larger than China’s.

Relations between the two nations have been tense recently, including a diplomatic blowup in February after a Chinese spy balloon traversed the United States before being shot down over the Atlantic Ocean. Republicans as well as Democrats continue to describe China as an obvious economic rival as well as a security threat.

Tensions also remain high over the future of Taiwan, which China claims as its territory. And many American officials have lost patience with the idea of bringing China into the rules-based international system, arguing that efforts to do so in past decades had failed to adequately improve its trade practices.

But Ms. Yellen will argue that competition between the United States and China can lead to mutual improvement, within certain parameters.

“Sports teams perform at a higher level when they consistently face top rivals,” her prepared remarks say. “But this type of healthy competition is only sustainable if it is fair to both sides.” China has long used government support to help its firms at the expense of foreign competitors, and its industrial policy “has become more ambitious and complex,” Ms. Yellen will say.